Skip to main content
Version: 2.x

Interface: BursarRetryOptions

Defined in: javascript/src/retry.ts:21

Properties​

baseDelayMs?​

optional baseDelayMs?: number

Defined in: javascript/src/retry.ts:25

Initial exponential-backoff delay. Defaults to 250 ms.


factor?​

optional factor?: number

Defined in: javascript/src/retry.ts:29

Exponential-backoff multiplier. Defaults to 2.


jitter?​

optional jitter?: boolean

Defined in: javascript/src/retry.ts:31

Randomize backoff to prevent a thundering herd. Defaults to true.


maxAttempts?​

optional maxAttempts?: number

Defined in: javascript/src/retry.ts:23

Total attempts, including the first call. Defaults to 3.


maxDelayMs?​

optional maxDelayMs?: number

Defined in: javascript/src/retry.ts:27

Maximum delay between attempts. Defaults to 2 seconds.


maxElapsedMs?​

optional maxElapsedMs?: number

Defined in: javascript/src/retry.ts:33

Maximum elapsed retry budget. Defaults to 30 seconds.


onRetry?​

optional onRetry?: (error, nextAttempt, delayMs) => void | Promise<void>

Defined in: javascript/src/retry.ts:44

Observer invoked immediately before each retry is scheduled.

Parameters​

error​

Error

nextAttempt​

number

delayMs​

number

Returns​

void | Promise<void>


shouldRetry?​

optional shouldRetry?: (error) => boolean | Promise<boolean>

Defined in: javascript/src/retry.ts:42

Override the default error.retryable decision. This does not make an operation idempotent; mutation retries must reuse their idempotency key.

Parameters​

error​

Error

Returns​

boolean | Promise<boolean>


signal?​

optional signal?: AbortSignal

Defined in: javascript/src/retry.ts:35

Abort retries and pending backoff when this signal is aborted.


unref?​

optional unref?: boolean

Defined in: javascript/src/retry.ts:37

Allow Node.js to exit while waiting to retry. Defaults to false.