TypeSafeSDK.RetryPolicy (TypeSafeSDK v0.1.0)

Copy Markdown View Source

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.

Summary

Types

t()

@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
}

Functions

default_http_statuses()

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

new(opts \\ [])

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

new!(opts \\ [])

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

to_pristine_opts(policy)

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