{"record":{"id":"a5650a77372efd3c","repo":"HeyPuter/puter","slug":"bad-request-a5650a","errorCode":"bad_request","errorMessage":"User ID required for puter_output_path","messagePattern":"User ID required for puter_output_path","errorType":"http","errorClass":"HttpError","httpStatus":400,"severity":"error","filePath":"src/backend/drivers/ai-video/VideoGenerationDriver.ts","lineNumber":137,"sourceCode":"    }\n\n    async generate(args: IGenerateVideoParams) {\n        const actor = Context.get('actor') as Actor | undefined;\n        if (!actor)\n            throw new HttpError(401, 'Authentication required', {\n                legacyCode: 'unauthorized',\n            });\n\n        const puterOutputPath = args.puter_output_path;\n        delete args.puter_output_path;\n\n        // Validate the output path early — before spending credits.\n        let resolvedOutputPath: string | undefined;\n        if (puterOutputPath) {\n            const username = actor.user?.username;\n            const userId = actor.user?.id;\n            if (!userId || !username) {\n                throw new HttpError(\n                    400,\n                    'User ID required for puter_output_path',\n                    { legacyCode: 'bad_request' },\n                );\n            }\n            resolvedOutputPath = this.#resolveOutputPath(\n                puterOutputPath,\n                username,\n            );\n            await this.#assertWriteAccess(actor, resolvedOutputPath);\n        }\n\n        if (args.model) {\n            args.model = args.model.trim().toLowerCase();\n        }\n\n        const configuredProviders = Object.keys(this.#providers);\n        if (configuredProviders.length === 0) {","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/HeyPuter/puter/blob/908ec23eda38526170322c3edf71ba45ecb1ca95/src/backend/drivers/ai-video/VideoGenerationDriver.ts#L119-L155","documentation":"Error \"User ID required for puter_output_path\" thrown in HeyPuter/puter.","triggerScenarios":"Thrown at src/backend/drivers/ai-video/VideoGenerationDriver.ts:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the actor context includes a user id when using puter_output_path.","Remove puter_output_path or call the driver as an authenticated user."],"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"}