continuedev/continue · error · Error
HTTP error! status
Error message
HTTP error! status: ${response.status} What it means
The POST to the Greptile search API returned a non-OK HTTP status. This is the generic !response.ok guard; response.status (401, 403, 422, 500, 504...) identifies the cause. Note this throw is then swallowed by the outer catch which rethrows the generic message (see error 28).
Solutions
- Reproduce with curl to api.greptile.com and read the status/body
- Regenerate the Greptile token if 401/403 and confirm the repo is indexed in the Greptile dashboard
- Retry after a delay on 429/5xx; check Greptile status page
Example fix
// before
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
// after
if (!response.ok) {
const body = await response.text();
throw new Error(`Greptile HTTP ${response.status}: ${body.slice(0, 200)}`);
} Defensive patterns
Strategy: retry
Try / catch
try {
const r = await fetch(url, options);
if (!r.ok && (r.status === 429 || r.status >= 500)) await retryAfterBackoff();
} catch (e) { /* surface status from console log */ } Prevention
- Keep the Greptile token fresh and the repo indexed
- Retry 429/5xx with exponential backoff
- Log response bodies to diagnose 4xx quickly
When it happens
Trigger: Calling Greptile with an invalid/expired token (401), a repo Greptile hasn't indexed or no access to (403/404), malformed query (400/422), or Greptile server issues (5xx).
Common situations: Expired GREPTILE_AUTH_TOKEN, repo not synced to Greptile dashboard, rate limits, or Greptile API changes/outage.
Related errors
- Failed to fetch Google search results
- Error getting context items from Greptile
- Failed to determine the workspace directory.
- Failed to fetch Ollama library
- Failed to fetch OpenRouter models
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/6dd68b3314f8a993.
Report an issue: GitHub.
Appendix: source
Thrown at core/context/providers/GreptileContextProvider.ts:84
repository: repoName,
},
],
sessionId: extras.config.userToken || "default-session",
stream: false,
genius: true,
}),
};
try {
const response = await extras.fetch(
"https://api.greptile.com/v2/query",
options,
);
const rawText = await response.text();
// Check for HTTP errors
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
// Parse the response as JSON
try {
const json = JSON.parse(rawText);
return json.sources.map((source: any) => ({
description: source.filepath,
content: `File: ${source.filepath}\nLines: ${source.linestart}-${source.lineend}\n\n${source.summary}`,
name:
(source.filepath.split("/").pop() ?? "").split("\\").pop() ?? "",
}));
} catch (jsonError) {
throw new Error(`Failed to parse Greptile response:\n${rawText}`);
}
} catch (error) {
console.error("Error getting context items from Greptile:", error);
throw new Error("Error getting context items from Greptile");
}View on GitHub (pinned to 5522c6f44c)