{"record":{"id":"6d5f7e645de3a69d","repo":"google-gemini/gemini-cli","slug":"etimedout","errorCode":"ETIMEDOUT","errorMessage":"Request timed out after ${timeout}ms","messagePattern":"Request timed out after (.+?)ms","errorType":"error_code","errorClass":"FetchError","httpStatus":null,"severity":"error","filePath":"packages/core/src/utils/fetch.ts","lineNumber":491,"sourceCode":"    if (!fetchOptions.dispatcher) {\n      fetchOptions.dispatcher = currentProxy\n        ? createSafeProxyAgent(currentProxy)\n        : defaultSafeAgent;\n    }\n\n    const response = await fetch(url, fetchOptions);\n    return response;\n  } catch (error) {\n    if (isAbortError(error)) {\n      // If the caller's own signal was already aborted, this is a user-initiated\n      // cancellation (e.g. Ctrl+C), not an internal timeout. Re-throw as a plain\n      // AbortError so the retry layer does NOT treat it as a retryable ETIMEDOUT.\n      if (options?.signal?.aborted) {\n        // Rethrow the original abort reason or the caught error to preserve\n        // the stack trace and any custom abort reason (e.g. from Ctrl+C).\n        throw options.signal.reason ?? error;\n      }\n      throw new FetchError(`Request timed out after ${timeout}ms`, 'ETIMEDOUT');\n    }\n    if (error instanceof PrivateIpError) {\n      throw error;\n    }\n    if (error && typeof error === 'object' && 'cause' in error) {\n      if (error.cause instanceof PrivateIpError) {\n        throw error.cause;\n      }\n    }\n    throw new FetchError(getErrorMessage(error), undefined, { cause: error });\n  } finally {\n    clearTimeout(timeoutId);\n  }\n}\n\nexport function setGlobalProxy(proxy: string) {\n  const trimmedProxy = proxy.trim();\n  currentProxy = trimmedProxy;","sourceCodeStart":473,"sourceCodeEnd":509,"githubUrl":"https://github.com/google-gemini/gemini-cli/blob/6a466a7e2fe2b1255752c1e74f69b31f0216084d/packages/core/src/utils/fetch.ts#L473-L509","documentation":"The HTTP request exceeded the per-call timeout and was aborted internally; the abort is converted into a FetchError with code ETIMEDOUT so the retry layer can treat it as retryable. It only fires when the caller's own signal was not already aborted (user cancellation is re-thrown as a plain AbortError instead).","triggerScenarios":"Thrown at packages/core/src/utils/fetch.ts:491 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase the timeout argument for slow endpoints","Let the retry layer re-attempt the request","Check network/proxy latency or server responsiveness"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6a466a7e2fe2b1255752c1e74f69b31f0216084d","analyzedAt":"2026-09-16T18:14:43.978Z","contentChangedAt":"2026-09-16T18:14:43.978Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}