vapor-chamber API reference - v1.3.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

    Properties

    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: always retry.