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

Function isServerError

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

Source from the content-addressed store, hash-verified

1619
1620/** Detect HTTP 5xx errors from axios (code: 'ERR_BAD_RESPONSE'). */
1621export function isServerError(err: unknown): boolean {
1622 return (
1623 !!err &&
1624 typeof err === 'object' &&
1625 'code' in err &&
1626 typeof err.code === 'string' &&
1627 err.code === 'ERR_BAD_RESPONSE'
1628 )
1629}
1630
1631/** Add ±25% jitter to a delay value. */
1632function addJitter(ms: number): number {

Callers 1

runBridgeLoopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected