# `TypeSafeSDK.RetryPolicy`
[🔗](https://github.com/nshkrdotcom/typesafe_sdk/blob/v0.4.0/lib/typesafe_sdk/retry_policy.ex#L1)

Retry configuration matching the public policy of the supplied Python SDK.

`max_retries` counts retries after the initial request. Backoff values are in
seconds at this public boundary and are translated to Pristine milliseconds.
HTTP status membership is applied through the provider profile, so
per-client and per-call status overrides affect actual retry classification.

# `t`

```elixir
@type t() :: %TypeSafeSDK.RetryPolicy{
  api_connection_error: boolean(),
  api_timeout_error: boolean(),
  backoff_initial: number(),
  backoff_jitter: float(),
  backoff_max: number(),
  http_statuses: MapSet.t(integer()) | [integer()],
  max_retries: non_neg_integer(),
  respect_retry_after: boolean(),
  timeout: number() | nil
}
```

# `default_http_statuses`

```elixir
@spec default_http_statuses() :: MapSet.t(integer())
```

# `merge`

```elixir
@spec merge(t() | false | nil, t() | keyword() | map() | false | nil) ::
  {:ok, t() | false} | {:error, TypeSafeSDK.Error.t()}
```

Merge a per-call retry override into a client policy.

Omitted keys inherit from the client policy. `false` explicitly disables
retries. A complete `%RetryPolicy{}` is already fully resolved and replaces
the inherited policy. When a disabled client is explicitly re-enabled with a
keyword/map override, omitted fields inherit the SDK policy defaults.

# `merge!`

```elixir
@spec merge!(t() | false | nil, t() | keyword() | map() | false | nil) :: t() | false
```

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, TypeSafeSDK.Error.t()}
```

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

# `to_pristine_opts`

```elixir
@spec to_pristine_opts(t() | false | nil) :: keyword()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
