{"record":{"id":"043b585e9026e7b2","repo":"diegosouzapw/OmniRoute","slug":"video-artifact-unavailable-043b58","errorCode":"VIDEO_ARTIFACT_UNAVAILABLE","errorMessage":"Veo AI Free did not return a valid MP4 artifact","messagePattern":"Veo AI Free did not return a valid MP4 artifact","errorType":"http","errorClass":null,"httpStatus":502,"severity":"error","filePath":"open-sse/handlers/videoGeneration.ts","lineNumber":431,"sourceCode":"  const item = Array.isArray(payload?.data) ? payload.data[0] : null;\n  if (\n    !payload ||\n    !Array.isArray(payload.data) ||\n    payload.data.length !== 1 ||\n    !item ||\n    typeof item.b64_json !== \"string\" ||\n    item.b64_json.trim().length === 0 ||\n    item.format !== \"mp4\" ||\n    typeof item.url === \"string\"\n  ) {\n    return {\n      success: false,\n      status: 502,\n      error: {\n        error: {\n          message: \"Veo AI Free did not return a valid MP4 artifact\",\n          type: \"upstream_error\",\n          code: \"VIDEO_ARTIFACT_UNAVAILABLE\",\n        },\n      },\n    };\n  }\n\n  return {\n    success: true,\n    data: payload,\n  };\n}\n\nasync function handleComfyUIVideoGeneration({ model, provider, providerConfig, body, log }) {\n  const startTime = Date.now();\n  const [width, height] = (body.size || \"512x512\").split(\"x\").map(Number);\n  const frames = body.frames || 16;\n\n  // AnimateDiff workflow template\n  const workflow = {","sourceCodeStart":413,"sourceCodeEnd":449,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/handlers/videoGeneration.ts#L413-L449","documentation":"Video generation response validation in videoGeneration.ts: the Veo AI Free upstream answered, but its payload is not exactly one data item containing a non-empty base64 MP4 (b64_json string, format 'mp4', no plain url). The 502 VIDEO_ARTIFACT_UNAVAILABLE error protects callers from receiving a corrupt or missing video artifact.","triggerScenarios":"Thrown at open-sse/handlers/videoGeneration.ts:431 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the generation — upstream may have produced an empty/failed artifact","Check upstream logs for the actual Veo response shape","Reduce prompt complexity or duration constraints that may cause upstream failure"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}