RetryOptions
Defined in: utils/timing.ts:151
Options for retry logic.
Properties
Section titled “Properties”backoff?
Section titled “backoff?”
optionalbackoff:"linear"|"exponential"
Defined in: utils/timing.ts:157
Backoff strategy: “linear” adds delay, “exponential” doubles it (default: “exponential”)
delay?
Section titled “delay?”
optionaldelay:number
Defined in: utils/timing.ts:155
Initial delay between retries in milliseconds (default: 1000)
maxDelay?
Section titled “maxDelay?”
optionalmaxDelay:number
Defined in: utils/timing.ts:159
Maximum delay cap in milliseconds (default: 30000)
maxRetries?
Section titled “maxRetries?”
optionalmaxRetries:number
Defined in: utils/timing.ts:153
Maximum number of retry attempts (default: 3)
onRetry()?
Section titled “onRetry()?”
optionalonRetry: (error,attempt,delay) =>void
Defined in: utils/timing.ts:163
Optional callback on each retry attempt
Parameters
Section titled “Parameters”unknown
attempt
Section titled “attempt”number
number
Returns
Section titled “Returns”void
shouldRetry()?
Section titled “shouldRetry()?”
optionalshouldRetry: (error,attempt) =>boolean
Defined in: utils/timing.ts:161
Optional function to determine if error is retryable (default: all errors)
Parameters
Section titled “Parameters”unknown
attempt
Section titled “attempt”number
Returns
Section titled “Returns”boolean