Skip to main content
Version: 2.x

Interface: BursarRetryOptions

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

Properties

baseDelayMs?

optional baseDelayMs?: number

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

Initial exponential-backoff delay. Defaults to 250 ms.


factor?

optional factor?: number

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

Exponential-backoff multiplier. Defaults to 2.


jitter?

optional jitter?: boolean

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

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


maxAttempts?

optional maxAttempts?: number

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

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


maxDelayMs?

optional maxDelayMs?: number

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

Maximum delay between attempts. Defaults to 2 seconds.


maxElapsedMs?

optional maxElapsedMs?: number

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

Maximum elapsed retry budget. Defaults to 30 seconds.


onRetry?

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

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

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:28

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:21

Abort retries and pending backoff when this signal is aborted.


unref?

optional unref?: boolean

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

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