RetryOptions
Defined in: packages/core/src/async/retry.ts:20
Options accepted by withRetry.
Properties
Section titled “Properties”attempts?
Section titled “attempts?”
optionalattempts?:number
Defined in: packages/core/src/async/retry.ts:22
Max attempts including the first. Must be >= 1. Default 3.
baseMs?
Section titled “baseMs?”
optionalbaseMs?:number
Defined in: packages/core/src/async/retry.ts:24
Base delay in milliseconds between attempts. Default 100.
isRetryable?
Section titled “isRetryable?”
optionalisRetryable?: (error) =>boolean
Defined in: packages/core/src/async/retry.ts:37
Hook for overriding the retryable-error classifier. Defaults to isRetryableError. Tests use this to force specific branches; callers rarely need to touch it.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: packages/core/src/async/retry.ts:26
Abort pending sleeps and reject with the signal’s reason.
sleep?
Section titled “sleep?”
optionalsleep?: (ms,signal?) =>Promise<void>
Defined in: packages/core/src/async/retry.ts:31
Hook for injecting a sleep implementation. Defaults to setTimeout.
Exists so tests can run retry logic without wall-clock delays.
Parameters
Section titled “Parameters”number
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<void>