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

Function throwFault

source code/bridge/bridgeDebug.ts:98–112  ·  view source on GitHub ↗
(fault: BridgeFault, context: string)

Source from the content-addressed store, hash-verified

96 }
97
98 function throwFault(fault: BridgeFault, context: string): never {
99 logForDebugging(
100 `[bridge:debug] Injecting ${fault.kind} fault into ${context}: status=${fault.status} errorType=${fault.errorType ?? 'none'}`,
101 )
102 if (fault.kind === 'fatal') {
103 throw new BridgeFatalError(
104 `[injected] ${context} ${fault.status}`,
105 fault.status,
106 fault.errorType,
107 )
108 }
109 // Transient: mimic an axios rejection (5xx / network). No .status on
110 // the error itself — that's how the catch blocks distinguish.
111 throw new Error(`[injected transient] ${context} ${fault.status}`)
112 }
113
114 return {
115 ...api,

Callers 4

pollForWorkFunction · 0.85
reconnectSessionFunction · 0.85
heartbeatWorkFunction · 0.85

Calls 1

logForDebuggingFunction · 0.85

Tested by

no test coverage detected