vapor-chamber API reference - v1.16.0
    Preparing search index...

    Type Alias RetryOptions

    type RetryOptions = {
        maxAttempts?: number;
        baseDelay?: number;
        strategy?: "fixed" | "linear" | "exponential";
        actions?: string[];
        isRetryable?: (error: Error, attempt: number) => boolean;
    }
    Index
    maxAttempts?: number

    Maximum number of attempts (including the first). Default: 3

    baseDelay?: number

    Base delay in ms between retries. Default: 200

    strategy?: "fixed" | "linear" | "exponential"

    Backoff strategy:

    • 'fixed' — always wait baseDelay ms
    • 'linear' — baseDelay * attempt
    • 'exponential' — baseDelay * 2^(attempt-1) Default: 'exponential'
    actions?: string[]

    Which actions to retry. Glob patterns supported: '', 'cart'. Default: all actions.

    isRetryable?: (error: Error, attempt: number) => boolean

    Return true if the error is retryable.

    Default: BusErrors (a .code starting with 'VC_') are retried only when the code is transient per RETRYABLE_CODES (throttled, rate-limited, timeout, circuit-open, ...) — known-permanent codes (validation, sealed bus, max depth, ...) stop retrying immediately instead of wasting attempts. All other errors are always retried. (Before v1.3 the default retried everything; behavior for plain Errors is unchanged.)