HeyPuter/puter · error · HttpError

field_required

field_required

Error message

Missing required field: text

What it means

Error "Missing required field: text" thrown in HeyPuter/puter.

Source

Thrown at src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts:113

    async synthesize(
        args: ISynthesizeArgs,
    ): Promise<DriverStreamResult | { url: string; content_type: string }> {
        const {
            text,
            voice: voiceArg,
            language,
            response_format,
            output_format,
            test_mode,
        } = args;

        if (test_mode) {
            return { url: SAMPLE_AUDIO_URL, content_type: 'audio' };
        }

        if (typeof text !== 'string' || !text.trim()) {
            throw new HttpError(400, 'Missing required field: text', {
                legacyCode: 'field_required',
                fields: { key: 'text' },
            });
        }

        if (text.length > 15000) {
            throw new HttpError(
                400,
                'Text exceeds maximum length of 15,000 characters',
                { legacyCode: 'bad_request' },
            );
        }

        const voice = voiceArg || DEFAULT_VOICE;

        const actor = Context.get('actor')!;
        const ucentsPerChar = XAI_TTS_COSTS['xai-tts'] ?? 0;
        const totalCost = ucentsPerChar * text.length;

View on GitHub (pinned to 908ec23eda)

Solutions

  1. Pass a non-empty `text` field in the request body.
  2. Verify the request payload includes `text` before calling the TTS driver.

When it happens

Trigger: Thrown at src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts:113 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/78c0cf50abf7e092. Report an issue: GitHub.