Skip to content

Type Alias: BeforeRetryHook ​

BeforeRetryHook = (state) => Request | typeof stop | void | Promise<Request | typeof stop | void>

Defined in: src/types/hooks.ts:52

Hook called before each retry is scheduled. Return stop to abort retrying (the original failure is then handled as if retries were exhausted), a Request to replace the request for subsequent attempts, or nothing to leave the request unchanged.

Parameters ​

state ​

BeforeRetryState

Returns ​

Request | typeof stop | void | Promise<Request | typeof stop | void>

Released under the MIT License. Built with Claude Code.