@cercalia/sdk
    Preparing search index...

    Function withRetryAlternatives

    • Executes multiple async functions in sequence with retries.

      Type Parameters

      • T

      Parameters

      • attempts: (() => Promise<T | null>)[]

        Array of async functions to try in order.

      • options: RetryOptions = {}

        Retry configuration options.

      Returns Promise<T | null>

      The result of the first successful function, or null if all fail.

      If the first attempt fails or returns null, tries alternative functions. Useful for fallback strategies (e.g., different search parameters).

      The last error if all attempts fail with an error.