Skip to main content
zerotal

Documentation


Documentation / @zerotal/client / index / RetryOptions

Interface: RetryOptions

Defined in: client/src/http.ts:110

Properties

attempts?

optional attempts?: number

Defined in: client/src/http.ts:112

Max retry attempts after the first try. Default: 2.


methods?

optional methods?: string[]

Defined in: client/src/http.ts:114

HTTP methods eligible for retry. Default: idempotent verbs (GET/PUT/DELETE/HEAD/OPTIONS).


statuses?

optional statuses?: number[]

Defined in: client/src/http.ts:116

HTTP statuses that should be retried. Default: 408, 425, 429, 500, 502, 503, 504.


respectRetryAfter?

optional respectRetryAfter?: boolean

Defined in: client/src/http.ts:118

Honor a Retry-After header when present. Default: true.


backoff?

optional backoff?: (attempt, retryAfterMs) => number

Defined in: client/src/http.ts:120

Compute the delay (ms) before attempt N. Default: exponential backoff + jitter.

Parameters

attempt

number

retryAfterMs

number | null

Returns

number