Skip to content

RetryOptions

Defined in: packages/core/src/retry.ts:3

optional baseDelayMs?: number

Defined in: packages/core/src/retry.ts:7

Initial delay before the second attempt, in ms. Defaults to 200.


optional isRetryable?: (err) => boolean

Defined in: packages/core/src/retry.ts:13

Override the default predicate. Default treats retryable LoncaErrors as retryable.

unknown

boolean


optional jitter?: boolean

Defined in: packages/core/src/retry.ts:11

Add up to 50% random jitter on each delay. Defaults to true.


optional maxAttempts?: number

Defined in: packages/core/src/retry.ts:5

Total number of attempts including the initial call. Defaults to 3.


optional maxDelayMs?: number

Defined in: packages/core/src/retry.ts:9

Upper bound on delay between any two attempts, in ms. Defaults to 10_000.


optional onRetry?: (err, attempt, nextDelayMs) => void

Defined in: packages/core/src/retry.ts:15

Called before each retry sleep. Useful for structured logging.

unknown

number

number

void


optional signal?: AbortSignal

Defined in: packages/core/src/retry.ts:17

Abort all pending sleeps and bubble the signal’s reason.

Unofficial. Lonca is an independent, community-maintained project — not affiliated with, endorsed by, or supported by Trendyol, Hepsiburada, or any other marketplace. All marketplace names and trademarks belong to their respective owners.