• Run fn, retrying on transient errors with exponential backoff + jitter.

    The initial call counts as attempt 0; up to maxRetries further attempts are made. Permanent errors (per isRetryableRpcError) are re-thrown immediately. The last error is re-thrown once retries are exhausted.

    Type Parameters

    • T

    Parameters

    • fn: (() => Promise<T>)
        • (): Promise<T>
        • Returns Promise<T>

    • options: RetryOptions = {}

    Returns Promise<T>