OptionaldelayDelay between retry attempts in milliseconds.
Can be a static number or a function for custom strategies like exponential backoff. The function receives the current attempt number (1-indexed).
OptionalonCallback invoked before each retry attempt.
Useful for logging, metrics, or adjusting request parameters.
OptionalretriesNumber of times to retry the request on failure.
By default, only network errors trigger retries. HTTP errors (4xx, 5xx)
require explicit configuration via when.
OptionalwhenConditions under which to retry the request.
Can be an array of HTTP status codes or a custom function. By default, only network errors (not FetchError) trigger retries.
Options for configuring retry behavior.