(error: unknown)
| 110 | } |
| 111 | |
| 112 | function isStaleConnectionError(error: unknown): boolean { |
| 113 | if (!(error instanceof APIConnectionError)) { |
| 114 | return false |
| 115 | } |
| 116 | const details = extractConnectionErrorDetails(error) |
| 117 | return details?.code === 'ECONNRESET' || details?.code === 'EPIPE' |
| 118 | } |
| 119 | |
| 120 | export interface RetryContext { |
| 121 | maxTokensOverride?: number |
no test coverage detected