API Core - v1.5.0
    Preparing search index...

    Interface RetryBackoffOptions

    Options for withRetryBackoff.

    interface RetryBackoffOptions {
        initialDelayMs: number;
        isRetryable: (error: unknown) => boolean;
        jitterRatio: number;
        maxDelayMs: number;
        maxRetries: number;
        onRetry?: (attempt: number, error: unknown, delayMs: number) => void;
        signal?: AbortSignal;
    }
    Index
    initialDelayMs: number

    Initial delay in milliseconds before the first retry.

    isRetryable: (error: unknown) => boolean

    Predicate deciding whether a thrown error is worth retrying.

    jitterRatio: number

    Jitter ratio applied to each computed delay (0..1).

    maxDelayMs: number

    Upper bound on the backoff delay.

    maxRetries: number

    Maximum retry attempts after the initial try (0 disables retries).

    onRetry?: (attempt: number, error: unknown, delayMs: number) => void

    Optional hook invoked before the next attempt.

    signal?: AbortSignal

    Optional abort signal. When fired during a backoff sleep, the pending wait rejects with signal.reason and the retry loop exits immediately — so a cancelled caller doesn't pay for an in-flight delay before the next attempt would have started.