{"record":{"id":"112688535e1ad393","repo":"n8n-io/n8n","slug":"no-task-id-returned-from-video-generation-request-112688","errorCode":null,"errorMessage":"No task_id returned from video generation request","messagePattern":"No task_id returned from video generation request","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.ts","lineNumber":150,"sourceCode":"\n\tif (options.promptOptimizer !== undefined) {\n\t\tbody.prompt_optimizer = options.promptOptimizer;\n\t}\n\n\tconst createResponse = (await apiRequest.call(this, 'POST', '/video_generation', {\n\t\tbody,\n\t})) as VideoGenerationResponse;\n\n\tif (createResponse.base_resp?.status_code !== 0) {\n\t\tthrow new NodeOperationError(\n\t\t\tthis.getNode(),\n\t\t\t`Failed to create video task: ${createResponse.base_resp?.status_msg || 'Unknown error'}`,\n\t\t);\n\t}\n\n\tconst taskId = createResponse.task_id;\n\tif (!taskId) {\n\t\tthrow new NodeOperationError(\n\t\t\tthis.getNode(),\n\t\t\t'No task_id returned from video generation request',\n\t\t);\n\t}\n\n\tconst { fileId } = await pollVideoTask.call(this, taskId);\n\tconst videoUrl = await getVideoDownloadUrl.call(this, fileId);\n\n\tconst jsonData: IDataObject = {\n\t\tvideoUrl,\n\t\ttaskId,\n\t\tfileId,\n\t};\n\n\tif (downloadVideo && videoUrl) {\n\t\tconst videoResponse = await this.helpers.httpRequest({\n\t\t\tmethod: 'GET',\n\t\t\turl: videoUrl,","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.ts#L132-L168","documentation":"Thrown by the t2v video operation when POST /video_generation returned success (status_code 0) but createResponse.task_id is missing. Same response-shape inconsistency as error 869 but on the text-to-video path; the node cannot poll without a task_id and aborts.","triggerScenarios":"Transient backend inconsistency returning success without task_id; API revision relocating the field; proxy stripping the field; truncated response under load.","commonSituations":"Rare upstream glitch; non-official base URL filtering the response.","solutions":["Retry the create request.","Log the full createResponse to confirm task_id absence.","Verify the credentials base URL is the official MiniMax endpoint.","If recurring, report to MiniMax with the response body."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// No caller-side input prevents an upstream success-without-task_id glitch.\n// Validate only the request shape before sending.\nfunction validateT2vRequestShape(body: IDataObject): string | null {\n  if (typeof body.prompt !== 'string' || body.prompt.length === 0) return 'body.prompt must be a non-empty string';\n  if (typeof body.model !== 'string') return 'body.model is required';\n  return null;\n}","typeGuard":"function hasTaskId(r: unknown): r is { task_id: string } {\n  return typeof (r as { task_id?: unknown })?.task_id === 'string' &&\n    ((r as { task_id: string }).task_id.length > 0);\n}","tryCatchPattern":"async function createT2vWithRetry(apiRequest: any, body: IDataObject, maxAttempts = 3): Promise<string> {\n  for (let attempt = 0; attempt < maxAttempts; attempt++) {\n    const createResponse = (await apiRequest.call(this, 'POST', '/video_generation', { body })) as VideoGenerationResponse;\n    if (createResponse.base_resp?.status_code !== 0) {\n      throw new NodeOperationError(this.getNode(), `Failed to create video task: ${createResponse.base_resp?.status_msg || 'Unknown error'}`);\n    }\n    if (createResponse.task_id) return createResponse.task_id;\n    await sleep(1000 * (attempt + 1));\n  }\n  throw new NodeOperationError(this.getNode(), 'No task_id returned from video generation request');\n}","preventionTips":["Treat success-without-task_id as transient and retry before failing.","Log the full createResponse to detect a real API field rename versus a glitch.","Use the official MiniMax base URL to avoid response-filtering proxies.","If it persists, report the response body to MiniMax support."],"tags":["minimax","video-generation","t2v","response-shape","task-id"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}