(errorMessage: string | undefined)
| 118 | } |
| 119 | |
| 120 | export function isTransportLevelError(errorMessage: string | undefined): boolean { |
| 121 | if (!errorMessage) return false; |
| 122 | const message = normalizeErrorText(errorMessage); |
| 123 | return ( |
| 124 | includesWord(message, 'terminated') || |
| 125 | message.includes('premature close') || |
| 126 | message.includes('stream ended') || |
| 127 | message.includes('stream closed') || |
| 128 | message.includes('econnreset') |
| 129 | ); |
| 130 | } |
| 131 | |
| 132 | export function isProviderAbortedTransportError(errorMessage: string | undefined): boolean { |
| 133 | if (!errorMessage) return false; |
no test coverage detected