{"record":{"id":"8f9c9775760c121f","repo":"continuedev/continue","slug":"failed-to-fetch-web-context-text","errorCode":null,"errorMessage":"Failed to fetch web context: ${text}","messagePattern":"Failed to fetch web context: (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/context/providers/WebContextProvider.ts","lineNumber":30,"sourceCode":"  query: string,\n  n: number,\n  fetchFn: FetchFunction,\n): Promise<ContextItem[]> => {\n  const resp = await fetchFn(WebContextProvider.ENDPOINT, {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      ...(await getHeaders()),\n    },\n    body: JSON.stringify({\n      query,\n      n,\n    }),\n  });\n\n  if (!resp.ok) {\n    const text = await resp.text();\n    throw new Error(`Failed to fetch web context: ${text}`);\n  }\n  return await resp.json();\n};\n\nexport default class WebContextProvider extends BaseContextProvider {\n  public static ENDPOINT = new URL(\"web\", TRIAL_PROXY_URL);\n  private static DEFAULT_N = 6;\n\n  static description: ContextProviderDescription = {\n    title: \"web\",\n    displayTitle: \"Web\",\n    description: \"Search the web\",\n    type: \"normal\",\n    renderInlineAs: \"\",\n  };\n\n  async getContextItems(\n    query: string,","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/context/providers/WebContextProvider.ts#L12-L48","documentation":"WebContextProvider.fetchSearchResults POSTs to the trial-proxy web search endpoint and throws when the response is not OK, embedding the response body text. The body usually contains a JSON error explaining the failure (e.g. rate limit for trial users).","triggerScenarios":"Using @web search via the free trial proxy when the endpoint returns an error: rate limited, trial disabled, or upstream search provider failure.","commonSituations":"Excessive @web usage hitting trial rate limits; trial period expired; changes in the proxy endpoint; regional blocking of the upstream search API.","solutions":["Read the response body text in the message — it names the exact reason","If rate limited, wait and retry; reduce frequency of @web usage","Configure a direct web search API (e.g. your own key/provider) instead of the trial proxy"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { const json = await fetchSearchResults(query, n); }\ncatch (e) {\n  if (/rate limit/i.test(e.message)) { await sleep(60_000); return fetchSearchResults(query, n); }\n  throw e;\n}","preventionTips":["Cache or debounce @web searches to avoid trial rate limits","Configure a dedicated web search API key for production use"],"tags":["web-search","http","proxy","rate-limit"],"backgroundTag":"api-rate-limit-exceeded","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}