MCPcopy Create free account
hub / github.com/Noumena-Network/code / isConnectionError

Function isConnectionError

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

Source from the content-addressed store, hash-verified

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

Callers 1

runBridgeLoopFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected