{"record":{"id":"15106346f47f1517","repo":"nexu-io/open-design","slug":"vela-video-task-ended-with-status-laststatus","errorCode":null,"errorMessage":"Vela video task ended with status ${lastStatus}: ${videoTaskError(task)}","messagePattern":"Vela video task ended with status (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/media/vela.ts","lineNumber":506,"sourceCode":"      if (returnedTaskId !== taskId) {\n        throw new Error(\n          `Vela video get returned unexpected task_id ${returnedTaskId ?? 'missing'} (expected ${taskId})`,\n        );\n      }\n      lastStatus = nonEmptyString(task.status) ?? 'missing';\n      const elapsedSeconds = Math.round((Date.now() - startedAt) / 1000);\n      input.onProgress?.(`Vela video status ${lastStatus}; elapsed ${elapsedSeconds}s`);\n\n      if (lastStatus === 'succeeded') {\n        const bytes = await readNonEmptyOutput(outputPath, 'video get');\n        return {\n          bytes,\n          providerNote: `vela/${wireModel} · ${ratio} · ${input.length ?? 5}s · ${DEFAULT_VELA_VIDEO_RESOLUTION} default · ${bytes.length} bytes`,\n          suggestedExt: '.mp4',\n        };\n      }\n      if (lastStatus === 'failed' || lastStatus === 'cancelled' || lastStatus === 'canceled') {\n        throw new Error(`Vela video task ended with status ${lastStatus}: ${videoTaskError(task)}`);\n      }\n      if (lastStatus !== 'queued' && lastStatus !== 'running') {\n        throw new Error(`Vela video task returned unsupported status ${lastStatus}`);\n      }\n    }\n\n    throw new Error(\n      `Vela video task timed out after ${totalTimeoutMs}ms; last status ${lastStatus}`,\n    );\n  } finally {\n    await rm(tempDir, { recursive: true, force: true });\n  }\n}\n","sourceCodeStart":488,"sourceCodeEnd":520,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/media/vela.ts#L488-L520","documentation":"The polled Vela video task reached a terminal failure state — status is 'failed', 'cancelled', or 'canceled'. The error message includes the backend-specific detail extracted by videoTaskError(task).","triggerScenarios":"The Vela backend rejected the video generation due to content policy, invalid input images, or a model error; a user or system cancelled the task; the task was canceled due to resource constraints or timeout on the server side.","commonSituations":"Input images violate content policy; the model failed to produce output; the task was manually cancelled from another client; backend GPU/resource limits exceeded.","solutions":["Read the videoTaskError(task) detail in the thrown error for the specific backend reason","Verify input images meet content and format requirements (count, dimensions, format)","Retry with different input images or a different model","Check Vela workspace quota and billing status"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const result = await renderVelaVideo(input);\n} catch (err) {\n  if (err.message.includes('task ended with status')) {\n    // Backend failure — surface the error detail to the user\n    const detail = err.message;\n    throw new UserFacingError(`Video generation failed: ${detail}`);\n  }\n  throw err;\n}","preventionTips":["Pre-validate input images for content policy compliance and supported formats","Check Vela workspace quota before initiating video generation","Log the videoTaskError detail so users can understand backend failures"],"tags":["vela","video","task-failure","external-api"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}