HeyPuter/puter · error · HttpError
upstream_bad_request
upstream_bad_request
Error message
xAI TTS request failed (status ${response.status}) What it means
Error "xAI TTS request failed (status ${response.status})" thrown in HeyPuter/puter.
Source
Thrown at src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts:189
// Map upstream status to an `upstream_*` HttpError so the
// alarm gate skips it. Mirrors ElevenLabs' translator —
// 4xx and 5xx both surface as 400 to the client (with the
// appropriate legacyCode), 429 stays 429, auth stays 500.
const legacyCode =
response.status >= 500
? 'upstream_provider_unavailable'
: response.status === 401 || response.status === 403
? 'upstream_auth_failed'
: response.status === 429
? 'upstream_rate_limited'
: 'upstream_bad_request';
const exposedStatus =
legacyCode === 'upstream_rate_limited'
? 429
: legacyCode === 'upstream_auth_failed'
? 500
: 400;
throw new HttpError(
exposedStatus,
errText || `xAI TTS request failed (status ${response.status})`,
{
legacyCode,
fields: {
provider: 'xai',
upstreamStatus: response.status,
},
},
);
}
const arrayBuffer = await response.arrayBuffer();
const buffer = Buffer.from(arrayBuffer);
const stream = Readable.from(buffer);
// Determine content type from response or codec
const respContentType =View on GitHub (pinned to 908ec23eda)
Solutions
- Check the xAI API key and request parameters, then retry.
- Inspect the upstream status code for the underlying cause.
When it happens
Trigger: Thrown at src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts:189 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HeyPuter/puter@908ec23eda (2026-08-12).
Data as JSON: /api/errors/b283958ba5c35720.
Report an issue: GitHub.