OptionalexponentiationExponentiation factor to use when computing the next retry delay.
Defaults to 2.
OptionalinitialInitial backoff interval. If a number is provided, it is interpreted as
milliseconds. Defaults to 100 milliseconds.
OptionalmaxMax number of attempts (including the initial), before giving up.
Defaults to 6 (the initial attempt plus up to 5 retries).
OptionalmaxMaximum backoff interval. If a number is provided, it is interpreted as
milliseconds. Defaults to 2000 milliseconds.
OptionalshouldDecide whether a given failure should be retried. When provided, this
fully replaces the built-in rule (network / 429 / 5xx).
The idempotency-key gate and the maxAttempts cap still apply — this
predicate only narrows or broadens which failures are retryable within
those bounds. Compose with the built-in rule via the exported
defaultShouldRetry.
the failure being considered
the zero-based index of the attempt that just failed
Policy controlling automatic retries of ambiguous ingress failures.
Retries are opt-in: they happen only when a policy is configured (see ConnectionOpts.retry) and the call carries an
idempotencyKey(see IngressCallOptions.idempotencyKey). Retrying without a key could double-execute a non-idempotent invocation, so the idempotency key is the safety boundary that a policy can never bypass.By default the following failures are retried: network errors (the underlying
fetchrejecting), HTTP429, and HTTP5xxresponses. Override this with RetryPolicy.shouldRetry.