decolua/9router · error
HTTP ${result.response.status}
Error message
HTTP ${result.response.status} What it means
Thrown by the Antigravity image adapter's executeViaExecutor (open-sse/handlers/imageProviders/antigravity.js:69) when the upstream HTTP response from the Antigravity executor is not ok. The thrown message is the raw response body text when present, otherwise the generic 'HTTP {status}'. This is the adapter's surfacing of any upstream rejection — auth failures, quota, invalid model suffix, malformed request — so the status/body is the real diagnostic.
Source
Thrown at open-sse/handlers/imageProviders/antigravity.js:69
const inlineData = resolveImageInput(imageInput);
if (inlineData) parts.unshift(inlineData);
}
const chatBody = {
contents: [{ role: "user", parts }],
};
const result = await executor.execute({
model: targetModel,
body: chatBody,
stream: false,
credentials,
log,
});
if (!result.response.ok) {
const text = await result.response.text();
throw new Error(text || `HTTP ${result.response.status}`);
}
return result.response.json();
},
normalize: (responseBody, prompt) => {
const candidates = responseBody.candidates || responseBody.response?.candidates || [];
const parts = candidates[0]?.content?.parts || [];
const images = parts.filter((p) => p.inlineData?.data).map((p) => ({
b64_json: p.inlineData.data,
}));
return {
created: nowSec(),
data: images.length > 0 ? images : [{ b64_json: "", revised_prompt: prompt }],
};
},
};View on GitHub (pinned to 90b52e06ff)
Solutions
- Read the thrown message (it contains the upstream body): fix the specific cause — re-authenticate for 401/403, back off for 429.
- For 404/model errors, check the resolved target model (model with aspect-ratio suffix appended) is valid for your account; adjust the requested size or model.
- If the input image is large, shrink it before sending (inlineData base64 has size limits).
- Check Antigravity service status if you see bare 'HTTP 5xx' with an empty body.
Defensive patterns
Strategy: try-catch
Validate before calling
// before generation, confirm the resolved model exists
const targetModel = /image|imagen/i.test(model) ? model : "gemini-3.1-flash-image";
if (!supportedAntigravityModels.includes(targetModel)) {
throw new Error(`Model ${targetModel} unavailable for this account`);
} Type guard
function isUpstreamHttpError(e) {
return e instanceof Error && (/^HTTP \d{3}$/.test(e.message) || /^\s*\{/.test(e.message));
} Try / catch
try {
const image = await generateImage({ provider: "antigravity", ... });
} catch (e) {
if (/HTTP 40[13]/.test(e.message)) return reauthAndRetry();
if (/HTTP 429/.test(e.message)) return backoffRetry(3);
// otherwise the message contains the upstream body — log it verbatim for diagnosis
log.error("antigravity upstream:", e.message);
throw e;
} Prevention
- Keep Antigravity OAuth credentials refreshed before they expire.
- Validate requested sizes map to real aspect-ratio model variants for your account.
- Cap inline image sizes before base64-encoding them into the request.
- Log full response bodies on failure — the thrown message is the upstream error.
When it happens
Trigger: executor.execute(...) returns result.response with response.ok === false: 401/403 (expired or missing Antigravity OAuth credentials), 404 (target model name like 'gemini-3.1-flash-image-1x1' not available to the account), 429 (rate limited), 4xx/5xx with an error body. The response text is read and thrown directly.
Common situations: Antigravity credentials expired and need re-auth; the aspect-ratio-suffixed image model doesn't exist for the account/region; request body rejected due to an oversized or malformed inlineData image; upstream outage returning 5xx with an HTML body (thrown verbatim as the error message).
Related errors
- Failed to fetch image: ${res.status}
- Antigravity executor not found
- BFL: no polling_url returned
- Antigravity API error: ${response.status}
- Machine ID is required for Cursor API
AI-assisted analysis of decolua/9router@90b52e06ff (2026-08-30).
Data as JSON: /api/errors/4652c8e1cd3fee43.
Report an issue: GitHub.