continuedev/continue · error · Error

HTTP

Error message

HTTP ${resp.status} ${resp.statusText}

What it means

URLContextProvider.getUrlContextItems fetched the URL and got a non-2xx response; the message includes status code and statusText (e.g. 'HTTP 404 Not Found'). Favicon fetch failures are tolerated earlier, but the main content fetch is strict.

Solutions

  1. Open the URL in a browser to confirm it exists; fix typos or use an archived copy
  2. If 403, the site likely blocks bots — try a different URL or an RSS/text version
  3. Retry: transient 5xx and rate limits often resolve on a second attempt

Example fix

// before
const resp = await fetchFn(url);
if (!resp.ok) throw new Error(`HTTP ${resp.status} ${resp.statusText}`);
// after
const resp = await fetchFn(url);
if (!resp.ok) {
  if (resp.status >= 500 || resp.status === 429) { /* retry once */ }
  throw new Error(`HTTP ${resp.status} ${resp.statusText} for ${url}`);
}
Defensive patterns

Strategy: retry

Validate before calling

async function checkUrl(url: string): Promise<boolean> {
  const r = await fetch(url, { method: 'HEAD' }).catch(() => null);
  return !!r && r.ok;
}

Try / catch

for (let i = 0; i < 2; i++) {
  try { return await getUrlContextItems(url); }
  catch (e) {
    if (!/HTTP 5\d\d|429/.test(e.message) || i === 1) throw e;
    await sleep(500 * 2 ** i);
  }
}

Prevention

When it happens

Trigger: Using the @url provider (or adding a URL to chat) where the server returns 404, 403 (bot blocking), 410, or 5xx.

Common situations: Dead links, sites blocking non-browser user agents with 403, paywalled or CDN-protected pages, or typos in the URL.

Related errors


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

Appendix: source

Thrown at core/context/providers/URLContextProvider.ts:42

    extras: ContextProviderExtras,
  ): Promise<ContextItem[]> {
    return await getUrlContextItems(query, extras.fetch);
  }
}

export default URLContextProvider;

export async function getUrlContextItems(
  query: string,
  fetchFn: FetchFunction,
): Promise<ContextItem[]> {
  const url = new URL(query);
  const icon = await fetchFavicon(url);
  const resp = await fetchFn(url);

  // Check if the response is not OK
  if (!resp.ok) {
    throw new Error(`HTTP ${resp.status} ${resp.statusText}`);
  }

  const html = await resp.text();

  const dom = new JSDOM(html);
  let reader = new Readability(dom.window.document);
  let article = reader.parse();
  const content = article?.content || "";
  const markdown = NodeHtmlMarkdown.translate(
    content,
    {},
    undefined,
    undefined,
  );

  const title = article?.title || url.pathname;

  return [

View on GitHub (pinned to 5522c6f44c)