Circle V2 API Docs
    Preparing search index...
    • Calls attempt again while shouldRetry holds, up to maxAttempts calls in all, waiting delayMs between them. It decides on the returned value, so pair it with safe() rather than throwing.

      Type Parameters

      • T

      Parameters

      • attempt: () => Promise<T>
      • options: {
            delayMs: (attemptsSoFar: number, result: T) => number;
            maxAttempts: number;
            shouldRetry: (result: T) => boolean;
        }

      Returns Promise<{ attempts: number; result: T }>