nexu-io/open-design · error · Error
anthropic ${resp.status}: ${await resp.text().catch(() => ''
Error message
anthropic ${resp.status}: ${await resp.text().catch(() => '')} What it means
The Anthropic Messages API returned a non-2xx HTTP status during the memory-LLM extraction call. The error includes the status code and the raw response body for diagnosis. This is the callAnthropic path in the daemon's automatic memory extractor, not the main chat runtime.
Source
Thrown at apps/daemon/src/memory-llm.ts:802
method: 'POST',
headers: {
'content-type': 'application/json',
'x-api-key': provider.apiKey,
'anthropic-version': '2023-06-01',
},
body: JSON.stringify({
model: provider.model,
max_tokens: 1024,
system,
messages: [{ role: 'user', content: user }],
}),
signal: withTimeout(FETCH_TIMEOUT_MS),
});
} catch (err) {
throw new Error(describeFetchError(err));
}
if (!resp.ok) {
throw new Error(`anthropic ${resp.status}: ${await resp.text().catch(() => '')}`);
}
const json = await resp.json();
const block = (json?.content || []).find((b) => b?.type === 'text');
return block?.text ?? '';
}
async function callOpenAI(provider, system, user) {
let resp;
try {
resp = await fetch(
appendVersionedApiPath(provider.baseUrl, '/chat/completions'),
{
method: 'POST',
headers: {
'content-type': 'application/json',
// Keyless BYOK endpoints (local vLLM / Ollama / openai-compatible
// servers marked with `requiresApiKey: false`) accept requests
// without an Authorization header — sending `Bearer ` (empty)View on GitHub (pinned to 5be4028344)
Solutions
- Check the API key is valid, has credits, and is correctly configured in the memory provider settings
- Verify provider.model is a current Anthropic model name available on the account
- Confirm provider.baseUrl points to the correct Anthropic endpoint
- Inspect the response body in the error message for the specific API error code
- Retry after a delay if the status is 429 (rate limited)
Defensive patterns
Strategy: try-catch
Try / catch
try {
const text = await callAnthropic(provider, system, user);
} catch (err) {
if (err.message.startsWith('anthropic ')) {
const status = parseInt(err.message.split(' ')[1], 10);
if (status === 429) {
// Rate limited — retry with backoff
await sleep(backoffMs);
return callAnthropic(provider, system, user);
}
if (status === 401 || status === 403) {
throw new Error('Anthropic API key is invalid or lacks permission');
}
}
throw err;
} Prevention
- Regularly verify API key validity and quota in the Anthropic console
- Set provider.model to a currently available model — deprecated models return errors
- Verify provider.baseUrl points to the official Anthropic endpoint or a compatible proxy
- Implement exponential backoff for 429 rate-limit responses
When it happens
Trigger: Invalid or expired API key (401/403); rate limiting (429); model name not available on the account; request payload malformed; quota or billing exceeded; network-level error page returned instead of JSON.
Common situations: API key revoked or rotated without updating daemon config; wrong baseUrl pointing to a non-Anthropic endpoint; model deprecated or not enabled for the key; hitting rate limits during batch memory extraction; billing issues.
Related errors
- openai ${resp.status}: ${await resp.text().catch(() => '')}
- azure ${resp.status}: ${await resp.text().catch(() => '')}
- google ${resp.status}: ${await resp.text().catch(() => '')}
- collab cloud error ${status} (${code})
- elevenlabs voices ${resp.status}: ${errText.slice(0, 240)}
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/ef772b887b399d7a.
Report an issue: GitHub.