(error: unknown)
| 604 | } |
| 605 | |
| 606 | export function is529Error(error: unknown): boolean { |
| 607 | if (!(error instanceof APIError)) { |
| 608 | return false |
| 609 | } |
| 610 | |
| 611 | // Check for 529 status code or overloaded error in message |
| 612 | return ( |
| 613 | error.status === 529 || |
| 614 | // See below: the SDK sometimes fails to properly pass the 529 status code during streaming |
| 615 | (error.message?.includes('"type":"overloaded_error"') ?? false) |
| 616 | ) |
| 617 | } |
| 618 | |
| 619 | function isOAuthTokenRevokedError(error: unknown): boolean { |
| 620 | return ( |
no outgoing calls
no test coverage detected