Interface HonuaRetryOptions

interface HonuaRetryOptions {
    baseDelayMs?: number;
    maxDelayMs?: number;
    maxRetries?: number;
    retryStatuses?: readonly number[];
}

Properties

baseDelayMs?: number

First backoff delay in milliseconds; doubles per attempt. Default: 100.

maxDelayMs?: number

Upper bound on any single backoff delay, including a server Retry-After. Default: 2000.

maxRetries?: number

Maximum number of transient-failure retry attempts after the initial request. Retry is entirely opt-in: values below 1 (including the default 0) disable the retry loop, so no status, network, or timeout failure is replayed.

This option does not govern the authentication replay. When an HonuaClientOptions.auth provider is configured, a replay-safe request (GET / HEAD / PUT / DELETE) answered with 401 or 403 is still reissued once after a forced credential refresh, even with retries disabled. Instrumentation that counts requests should expect that one extra attempt.

retryStatuses?: readonly number[]

HTTP statuses the loop replays on replay-safe methods (GET / HEAD / PUT / DELETE). Default: [429, 502, 503, 504] — the statuses that explicitly invite the same request again. This is intentionally narrower than the broader 408, 429, 500, 502, 503, 504 set that HonuaHttpError classifies as transient retryable metadata: that classification is descriptive and never initiates a retry. Pass the broader set here to opt into replaying 408 / 500.