Function safeGetRetryAfterMs

  • Parameters

    • error: unknown

      The error to check for a retry delay.

    • defaultMs: number

      The delay to use if the error was not due to rate-limiting or if no valid delay is recommended.

    Returns number

    The recommended delay in milliseconds to wait before retrying the request.