continuedev/continue · error · Error

Failed to fetch web context: ${text}

Error message

Failed to fetch web context: ${text}

What it means

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).

Source

Thrown at core/context/providers/WebContextProvider.ts:30

  query: string,
  n: number,
  fetchFn: FetchFunction,
): Promise<ContextItem[]> => {
  const resp = await fetchFn(WebContextProvider.ENDPOINT, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      ...(await getHeaders()),
    },
    body: JSON.stringify({
      query,
      n,
    }),
  });

  if (!resp.ok) {
    const text = await resp.text();
    throw new Error(`Failed to fetch web context: ${text}`);
  }
  return await resp.json();
};

export default class WebContextProvider extends BaseContextProvider {
  public static ENDPOINT = new URL("web", TRIAL_PROXY_URL);
  private static DEFAULT_N = 6;

  static description: ContextProviderDescription = {
    title: "web",
    displayTitle: "Web",
    description: "Search the web",
    type: "normal",
    renderInlineAs: "",
  };

  async getContextItems(
    query: string,

View on GitHub (pinned to 5522c6f44c)

Solutions

  1. Read the response body text in the message — it names the exact reason
  2. If rate limited, wait and retry; reduce frequency of @web usage
  3. Configure a direct web search API (e.g. your own key/provider) instead of the trial proxy
Defensive patterns

Strategy: retry

Try / catch

try { const json = await fetchSearchResults(query, n); }
catch (e) {
  if (/rate limit/i.test(e.message)) { await sleep(60_000); return fetchSearchResults(query, n); }
  throw e;
}

Prevention

When it happens

Trigger: Using @web search via the free trial proxy when the endpoint returns an error: rate limited, trial disabled, or upstream search provider failure.

Common situations: Excessive @web usage hitting trial rate limits; trial period expired; changes in the proxy endpoint; regional blocking of the upstream search API.

Related errors


AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27). Data as JSON: /api/errors/8f9c9775760c121f. Report an issue: GitHub.