Function safeGetRetryAfterMs

  • Parameters

    • error: unknown
    • defaultMs: number

    Returns number

    The recommended delay in milliseconds to wait before retrying the request that triggered error, or defaultMs if the error was not due to rate-limiting or if no valid delay is recommended.