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

Function isStaleConnectionError

source code/services/api/withRetry.ts:114–120  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

112}
113
114function isStaleConnectionError(error: unknown): boolean {
115 if (!(error instanceof APIConnectionError)) {
116 return false
117 }
118 const details = extractConnectionErrorDetails(error)
119 return details?.code === 'ECONNRESET' || details?.code === 'EPIPE'
120}
121
122export interface RetryContext {
123 maxTokensOverride?: number

Callers 1

withRetryFunction · 0.85

Calls 1

Tested by

no test coverage detected