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