(error: unknown)
| 651 | } |
| 652 | |
| 653 | export function is529Error(error: unknown): boolean { |
| 654 | if (!(error instanceof APIError)) { |
| 655 | return false |
| 656 | } |
| 657 | |
| 658 | // Check for 529 status code or overloaded error in message |
| 659 | return ( |
| 660 | error.status === 529 || |
| 661 | // See below: the SDK sometimes fails to properly pass the 529 status code during streaming |
| 662 | (error.message?.includes('"type":"overloaded_error"') ?? false) |
| 663 | ) |
| 664 | } |
| 665 | |
| 666 | function isOAuthTokenRevokedError(error: unknown): boolean { |
| 667 | return ( |
no outgoing calls
no test coverage detected