MCPcopy Create free account
hub / github.com/continuedev/continue / isConnectionError

Function isConnectionError

extensions/cli/src/util/exponentialBackoff.ts:65–78  ·  view source on GitHub ↗

* Checks if the error message indicates a connection issue

(errorMessage: string)

Source from the content-addressed store, hash-verified

63 * Checks if the error message indicates a connection issue
64 */
65function isConnectionError(errorMessage: string): boolean {
66 const connectionErrorPatterns = [
67 "premature close",
68 "premature end",
69 "connection reset",
70 "socket hang up",
71 "aborted",
72 "overloaded",
73 ];
74
75 return connectionErrorPatterns.some((pattern) =>
76 errorMessage.includes(pattern),
77 );
78}
79
80/**
81 * Checks if the error indicates a context length issue (non-retryable)

Callers 1

isRetryableErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected