{"record":{"id":"9109c4f665d708bf","repo":"HeyPuter/puter","slug":"upstream-failed-9109c4","errorCode":"upstream_failed","errorMessage":"Video generation failed","messagePattern":"Video generation failed","errorType":"http","errorClass":"HttpError","httpStatus":400,"severity":"error","filePath":"src/backend/drivers/ai-video/providers/together/TogetherVideoProvider.ts","lineNumber":203,"sourceCode":"            createPayload.metadata = metadata;\n        }\n\n        const job = await this.#client.videos.create(createPayload);\n        const finalJob = await this.#pollUntilComplete(job.id);\n\n        if (finalJob.status === 'failed') {\n            const errorMessage =\n                finalJob?.error.message ??\n                finalJob?.info?.errors?.[0]?.message ??\n                finalJob?.info?.errors?.message ??\n                finalJob?.info?.errors ??\n                'Video generation failed';\n            // Together returns `failed` for both user-input issues\n            // (content policy / unsupported params) and their own\n            // outages — we can't reliably tell from the payload, so\n            // expose as 4xx with `upstream_failed`. The alarm gate\n            // skips `upstream_*` legacy codes so this no longer pages.\n            throw new HttpError(400, errorMessage, {\n                legacyCode: 'upstream_failed',\n                fields: { provider: 'together' },\n            });\n        }\n\n        if (finalJob.status === 'cancelled') {\n            throw new Error('Video generation was cancelled');\n        }\n\n        const usageKey = `together-video:${model}`;\n        await this.#meteringService.incrementUsage(\n            actor,\n            usageKey,\n            1,\n            costInMicroCents,\n        );\n\n        const videoUrl = finalJob?.outputs?.video_url;","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/HeyPuter/puter/blob/908ec23eda38526170322c3edf71ba45ecb1ca95/src/backend/drivers/ai-video/providers/together/TogetherVideoProvider.ts#L185-L221","documentation":"Error \"Video generation failed\" thrown in HeyPuter/puter.","triggerScenarios":"Thrown at src/backend/drivers/ai-video/providers/together/TogetherVideoProvider.ts:203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the request; if it persists, check the Together AI API status and request parameters.","Inspect logs for the upstream failure detail."],"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"}