MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isConnectionError

Function isConnectionError

source code/bridge/bridgeMain.ts:1592–1603  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

1590])
1591
1592export function isConnectionError(err: unknown): boolean {
1593 if (
1594 err &&
1595 typeof err === 'object' &&
1596 'code' in err &&
1597 typeof err.code === 'string' &&
1598 CONNECTION_ERROR_CODES.has(err.code)
1599 ) {
1600 return true
1601 }
1602 return false
1603}
1604
1605/** Detect HTTP 5xx errors from axios (code: 'ERR_BAD_RESPONSE'). */
1606export function isServerError(err: unknown): boolean {

Callers 1

runBridgeLoopFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected