{"record":{"id":"36a3eaa0dc4221ff","repo":"n8n-io/n8n","slug":"response-error-message","errorCode":null,"errorMessage":"${response.error.message}","messagePattern":"\\$\\{response\\.error\\.message\\}","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/GoogleGemini/actions/video/generate.operation.ts","lineNumber":180,"sourceCode":"\t\t],\n\t\tparameters: {\n\t\t\taspectRatio: options.aspectRatio,\n\t\t\tpersonGeneration: options.personGeneration,\n\t\t\tsampleCount: options.sampleCount ?? 1,\n\t\t\tdurationSeconds: options.durationSeconds,\n\t\t},\n\t};\n\tlet response = (await apiRequest.call(this, 'POST', `/v1beta/${model}:predictLongRunning`, {\n\t\tbody,\n\t})) as VeoResponse;\n\n\twhile (!response.done) {\n\t\tawait new Promise((resolve) => setTimeout(resolve, 5000));\n\t\tresponse = (await apiRequest.call(this, 'GET', `/v1beta/${response.name}`)) as VeoResponse;\n\t}\n\n\tif (response.error) {\n\t\tthrow new NodeOperationError(this.getNode(), response.error.message, {\n\t\t\tdescription: 'Error generating video',\n\t\t});\n\t}\n\n\tif (returnAs === 'video') {\n\t\tconst promises = response.response.generateVideoResponse.generatedSamples.map(\n\t\t\tasync (sample) => {\n\t\t\t\tconst { fileContent, mimeType } = await downloadFile.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tsample.video.uri,\n\t\t\t\t\t'video/mp4',\n\t\t\t\t\t{\n\t\t\t\t\t\tkey: credentials.apiKey as string,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tconst fileName = getFilenameFromMimeType(mimeType, 'video', 'mp4');\n\t\t\t\tconst binaryData = await this.helpers.prepareBinaryData(fileContent, fileName, mimeType);\n\t\t\t\treturn {","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/GoogleGemini/actions/video/generate.operation.ts#L162-L198","documentation":"After Veo's predictLongRunning operation finishes polling (response.done === true), if the operation payload carries an 'error' object the node throws its message with description 'Error generating video'. This is the API-side failure surfaced after a successful LRO completion — the upload/submit succeeded but generation itself failed.","triggerScenarios":"Veo rejects the prompt (policy/character personGeneration mismatch, e.g. 'dont_allow' but prompt asks for identifiable people), the model id is wrong for the project, quota/billing exhausted, content filtered, or sample/duration parameters are out of range.","commonSituations":"personGeneration='Don't Allow' combined with a prompt about real people; project not enabled for Veo / not in the allowed region; aspect ratio or durationSeconds unsupported by the chosen Veo version; daily quota hit.","solutions":["Read response.error.message in the execution UI — it is the verbatim Veo error and usually names the exact problem (policy, quota, unsupported param).","If it's a person-generation policy error, switch personGeneration to 'Allow All' or 'Allow Adult' and/or reword the prompt.","If quota/billing, wait and retry, or enable Veo for the Google Cloud / AI Studio project.","Reduce sampleCount / durationSeconds to the documented Veo limits and retry."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"interface VeoLroDone { done: true; error?: { message: string }; response?: unknown }\nfunction isVeoFailure(r: unknown): r is VeoLroDone {\n  return !!r && typeof r === 'object' && (r as { done?: boolean }).done === true && !!(r as { error?: unknown }).error;\n}","tryCatchPattern":"try {\n  await videoGenerate.execute();\n} catch (e) {\n  if (e instanceof NodeOperationError && /policy|quota|unsupported/i.test(e.message)) {\n    // adjust personGeneration / sampleCount / duration, then retry\n  }\n  throw e;\n}","preventionTips":["Match personGeneration to prompt content (don't pair 'dont_allow' with prompts naming real people).","Stay within documented Veo limits for sampleCount and durationSeconds.","Confirm the project is enabled for Veo before wiring the node."],"tags":["google-gemini","video-generation","veo","api-error","long-running-operation","policy","node-operation-error"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}