RetryOptions
Defined in: src/pattern/retry.ts:1
Properties
Section titled “Properties”attempts
Section titled “attempts”
readonlyattempts:number
Defined in: src/pattern/retry.ts:3
Total attempts including the initial call. Must be >= 1.
delayMs?
Section titled “delayMs?”
readonlyoptionaldelayMs?:number
Defined in: src/pattern/retry.ts:5
Base delay between retries, in ms.
factor?
Section titled “factor?”
readonlyoptionalfactor?:number
Defined in: src/pattern/retry.ts:7
Exponential-backoff multiplier applied to delayMs (default 1 — no backoff).
maxDelayMs?
Section titled “maxDelayMs?”
readonlyoptionalmaxDelayMs?:number
Defined in: src/pattern/retry.ts:9
Upper bound for any individual retry delay.
onAttempt?
Section titled “onAttempt?”
readonlyoptionalonAttempt?: (err,attempt) =>void
Defined in: src/pattern/retry.ts:16
Called after each failed attempt; useful for logging/metrics.
Parameters
Section titled “Parameters”Error
attempt
Section titled “attempt”number
Returns
Section titled “Returns”void
shouldRetry?
Section titled “shouldRetry?”
readonlyoptionalshouldRetry?: (err,attempt) =>boolean
Defined in: src/pattern/retry.ts:14
Predicate that decides whether a specific error is retryable. Return false to short-circuit with the final error. Defaults to “retry any”.
Parameters
Section titled “Parameters”Error
attempt
Section titled “attempt”number
Returns
Section titled “Returns”boolean