Member Junction
    Preparing search index...
    • Executes an operation with retry logic using exponential backoff.

      Type Parameters

      • T

      Parameters

      • operation: () => Promise<T>

        The async operation to execute

      • config: RetryConfig = DEFAULT_RETRY_CONFIG

        Retry configuration (uses defaults if not provided)

      • isRetryable: (error: unknown) => boolean = ...

        Predicate to determine if a caught error should trigger a retry

      • OptionalonRetry: (attempt: number, error: unknown, delayMs: number) => void

        Optional callback invoked before each retry with attempt number, error, and delay. Runs BEFORE the wait, so it is the right place to report the failure onward (e.g. backing off a shared limiter) rather than after the retries are spent.

      • Optionalhooks: RetryHooks

        Optional RetryHooks for source-directed delays and pre-attempt gating

      Returns Promise<T>

      The result of the operation

      The last error encountered if all attempts fail