@adcp/client API Reference - v3.3.3
    Preparing search index...

    Function createRetryHandler

    • Create a retry handler that provides different responses based on attempt number

      Parameters

      • responses: any[]

        Array of responses for each attempt (1-indexed)

      • defaultResponse: any = deferAllHandler

        Response to use for attempts beyond the array length

      Returns InputHandler

      const handler = createRetryHandler([
      100000, // First attempt
      50000, // Second attempt
      25000 // Third attempt
      ], deferAllHandler);