{"record":{"id":"78c0cf50abf7e092","repo":"HeyPuter/puter","slug":"field-required-78c0cf","errorCode":"field_required","errorMessage":"Missing required field: text","messagePattern":"Missing required field: text","errorType":"validation","errorClass":"HttpError","httpStatus":400,"severity":"error","filePath":"src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts","lineNumber":113,"sourceCode":"\n    async synthesize(\n        args: ISynthesizeArgs,\n    ): Promise<DriverStreamResult | { url: string; content_type: string }> {\n        const {\n            text,\n            voice: voiceArg,\n            language,\n            response_format,\n            output_format,\n            test_mode,\n        } = args;\n\n        if (test_mode) {\n            return { url: SAMPLE_AUDIO_URL, content_type: 'audio' };\n        }\n\n        if (typeof text !== 'string' || !text.trim()) {\n            throw new HttpError(400, 'Missing required field: text', {\n                legacyCode: 'field_required',\n                fields: { key: 'text' },\n            });\n        }\n\n        if (text.length > 15000) {\n            throw new HttpError(\n                400,\n                'Text exceeds maximum length of 15,000 characters',\n                { legacyCode: 'bad_request' },\n            );\n        }\n\n        const voice = voiceArg || DEFAULT_VOICE;\n\n        const actor = Context.get('actor')!;\n        const ucentsPerChar = XAI_TTS_COSTS['xai-tts'] ?? 0;\n        const totalCost = ucentsPerChar * text.length;","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/HeyPuter/puter/blob/908ec23eda38526170322c3edf71ba45ecb1ca95/src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts#L95-L131","documentation":"Error \"Missing required field: text\" thrown in HeyPuter/puter.","triggerScenarios":"Thrown at src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty `text` field in the request body.","Verify the request payload includes `text` before calling the TTS driver."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"908ec23eda38526170322c3edf71ba45ecb1ca95","analyzedAt":"2026-08-12T20:53:15.911Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}