OptionalbackoffMaximum delay in milliseconds between retries.
Defaults to Infinity.
OptionaldelayCustom delay function. Receives the current attempt number (1-based) and returns the delay in milliseconds.
Defaults to exponential backoff: 0.3 * 2^(attempt-1) * 1000.
OptionaljitterAdds randomized jitter to the delay to avoid thundering-herd problems.
true — applies full jitter (delay * random(0, 1)).(delay) => adjustedDelay.Defaults to false (no jitter).
OptionallimitMaximum number of retry attempts. Defaults to 2.
OptionalmethodsHTTP methods that are eligible for retry.
Defaults to ['GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS'].
OptionalretryWhether to retry on timeout errors.
Defaults to false.
OptionalshouldCustom predicate to decide whether to retry a given error.
When provided, it is checked in addition to the statusCodes check.
OptionalstatusHTTP status codes that trigger a retry.
Defaults to [408, 429, 500, 502, 503, 504].
Options for the retry middleware.