(error)
| 74666 | const seconds = parseInt(retryAfter, 10); |
| 74667 | if (!isNaN(seconds)) { |
| 74668 | return seconds; |
| 74669 | } |
| 74670 | } |
| 74671 | } |
| 74672 | return void 0; |
| 74673 | } |
| 74674 | function extractErrorMessage(error) { |
| 74675 | if (error instanceof Error) { |
| 74676 | return error.message; |
| 74677 | } |
| 74678 | const apiError = error?.response?.data?.error; |
| 74679 | if (apiError) { |
| 74680 | if (typeof apiError === "string") { |
| 74681 | return apiError; |
| 74682 | } |
| 74683 | if (apiError.message) { |
| 74684 | return apiError.message; |
| 74685 | } |
| 74686 | } |
| 74687 | const errorData = error?.error; |
| 74688 | if (errorData) { |
| 74689 | if (typeof errorData === "string") { |
| 74690 | return errorData; |
| 74691 | } |
| 74692 | if (errorData.message) { |
| 74693 | return errorData.message; |
| 74694 | } |
| 74695 | } |
| 74696 | if (typeof error === "string") { |
| 74697 | return error; |
no outgoing calls
no test coverage detected
searching dependent graphs…