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

Function isNetworkError

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

* Checks if the error is a network-related error

(error: any)

Source from the content-addressed store, hash-verified

34 * Checks if the error is a network-related error
35 */
36function isNetworkError(error: any): boolean {
37 const networkCodes = [
38 "ECONNRESET",
39 "ENOTFOUND",
40 "ETIMEDOUT",
41 "EPIPE",
42 "ECONNREFUSED",
43 ];
44 return networkCodes.includes(error.code);
45}
46
47/**
48 * Checks if the HTTP status code is retryable

Callers 1

isRetryableErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected