MCPcopy
hub / github.com/claude-code-best/claude-code / isConnectionError

Function isConnectionError

src/bridge/bridgeMain.ts:1612–1623  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

1610])
1611
1612export function isConnectionError(err: unknown): boolean {
1613 if (
1614 err &&
1615 typeof err === 'object' &&
1616 'code' in err &&
1617 typeof err.code === 'string' &&
1618 CONNECTION_ERROR_CODES.has(err.code)
1619 ) {
1620 return true
1621 }
1622 return false
1623}
1624
1625/** Detect HTTP 5xx errors from axios (code: 'ERR_BAD_RESPONSE'). */
1626export function isServerError(err: unknown): boolean {

Callers 1

runBridgeLoopFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected