Skip to content

Interface: RetryOptions ​

Defined in: api/rust-fetch.d.ts:98

Properties ​

initialDelayMs? ​

optional initialDelayMs?: number

Defined in: api/rust-fetch.d.ts:102

Base delay before the first retry, in ms; each backoff is randomized to 50–100% (jitter). Default: 100


maxDelayMs? ​

optional maxDelayMs?: number

Defined in: api/rust-fetch.d.ts:104

Upper bound for any retry delay (including Retry-After), in ms. Default: 10000


maxRetries? ​

optional maxRetries?: number

Defined in: api/rust-fetch.d.ts:100

Maximum number of retries after the first attempt. Default: 3


multiplier? ​

optional multiplier?: number

Defined in: api/rust-fetch.d.ts:106

Exponential backoff multiplier (initialDelayMs * multiplier^(attempt - 1), with 50–100% jitter). Default: 2


retryNonIdempotent? ​

optional retryNonIdempotent?: boolean

Defined in: api/rust-fetch.d.ts:114

Also retry POST and PATCH requests, which may not be safe to repeat. Default: false


retryOn? ​

optional retryOn?: number[]

Defined in: api/rust-fetch.d.ts:108

HTTP status codes to retry. Default: [408, 429, 500, 502, 503, 504]


retryOnNetworkError? ​

optional retryOnNetworkError?: boolean

Defined in: api/rust-fetch.d.ts:110

Retry on network errors. Default: true


retryOnTimeout? ​

optional retryOnTimeout?: boolean

Defined in: api/rust-fetch.d.ts:112

Retry on timeouts. Default: true

Released under the MIT or Apache-2.0 license.