(error: unknown)
| 34 | * MCPClientError is not exported from the SDK, so we match on known message patterns. |
| 35 | * Known patterns: "closed client", "Connection closed", "Connection closed unexpectedly". */ |
| 36 | export function isClosedClientError(error: unknown): boolean { |
| 37 | const msg = getErrorMessage(error).toLowerCase(); |
| 38 | return ( |
| 39 | msg.includes("closed client") || |
| 40 | msg.includes("connection closed") || |
| 41 | msg.includes("not connected") |
| 42 | ); |
| 43 | } |
| 44 | |
| 45 | const MCP_TOOL_CALL_TIMEOUT_MS = 300_000; |
| 46 |
no test coverage detected