Vereda
    Preparing search index...

    Interface RetryConfig

    interface RetryConfig {
        maxRetries?: number;
        backoff?: BackoffOptions | BackoffFn;
        retryOnStatus?: number[];
        idempotent?: boolean;
        retryWhen?: (error: AppError, attempt: number) => boolean;
    }
    Index
    maxRetries?: number

    Retries after the first attempt. MaxRetriesExceededError.attempts is total executions, i.e. maxRetries + 1.

    { baseDelayMs: 200, maxDelayMs: 30_000, jitter: true }

    retryOnStatus?: number[]

    HTTP status codes that trigger retry (e.g. 408, 429, 500, 502, 503, 504).

    idempotent?: boolean

    Allows retrying non-idempotent methods (POST/PATCH). An Idempotency-Key header also enables retries. Default: false.

    retryWhen?: (error: AppError, attempt: number) => boolean

    Optional predicate to decide whether a failed attempt should be retried. Called exactly once per failed attempt that could still be retried, with the zero-based attempt number:

    • 0 = the first attempt (called client-side before the retry loop)
    • 1, 2, … = retries (called inside the loop, after attempt 0) Returning false surfaces the error immediately without retrying. Not called after the final attempt when no retries remain — there is nothing left to decide.