{"record":{"id":"f8b8f486c315886a","repo":"HeyPuter/puter","slug":"bad-request-f8b8f4","errorCode":"bad_request","errorMessage":"prompt must be a non-empty string","messagePattern":"prompt must be a non-empty string","errorType":"validation","errorClass":"HttpError","httpStatus":400,"severity":"error","filePath":"src/backend/drivers/ai-video/providers/openai/OpenAIVideoProvider.ts","lineNumber":70,"sourceCode":"\n    async models(): Promise<IVideoModel[]> {\n        return OPENAI_VIDEO_MODELS;\n    }\n\n    async generate(params: IGenerateVideoParams): Promise<unknown> {\n        const {\n            prompt,\n            model: requestedModel,\n            duration,\n            seconds,\n            size,\n            resolution,\n            input_reference: inputReference,\n            test_mode: testMode,\n        } = params ?? {};\n\n        if (typeof prompt !== 'string' || !prompt.trim()) {\n            throw new HttpError(400, 'prompt must be a non-empty string', {\n                legacyCode: 'bad_request',\n            });\n        }\n\n        const selectedModel = await this.#selectModel(requestedModel);\n\n        if (!selectedModel) {\n            throw new HttpError(400, `Unknown video model: ${requestedModel}`, {\n                legacyCode: 'bad_request',\n            });\n        }\n\n        if (testMode) {\n            return DEFAULT_TEST_VIDEO_URL;\n        }\n\n        const defaultSize = selectedModel.dimensions?.[0] ?? '720x1280';\n        const normalizedSize =","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/HeyPuter/puter/blob/908ec23eda38526170322c3edf71ba45ecb1ca95/src/backend/drivers/ai-video/providers/openai/OpenAIVideoProvider.ts#L52-L88","documentation":"Error \"prompt must be a non-empty string\" thrown in HeyPuter/puter.","triggerScenarios":"Thrown at src/backend/drivers/ai-video/providers/openai/OpenAIVideoProvider.ts:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty string as the `prompt` argument.","Validate the prompt client-side before calling the 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"}