n8n-io/n8n · error · NodeOperationError
${error.message}
Error message
${error.message} What it means
Catch-all in the Google Gemini router's per-item execution loop. When the dispatched operation (execute.call(this, i)) throws and the node is NOT in continueOnFail mode, the original error is re-wrapped as a NodeOperationError carrying the itemIndex and the original description. The message is the wrapped error's own message.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/GoogleGemini/actions/router.ts:64
break;
default:
throw new NodeOperationError(
this.getNode(),
`The operation "${operation}" is not supported!`,
);
}
for (let i = 0; i < items.length; i++) {
try {
const responseData = await execute.call(this, i);
returnData.push(...responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
continue;
}
throw new NodeOperationError(this.getNode(), error, {
itemIndex: i,
description: error.description,
});
}
}
return [returnData];
}
View on GitHub (pinned to 5ac6606e81)
Solutions
- Read the wrapped error's message/description — it identifies the real underlying failure (model not supported, upload failed, non-empty prompt, etc.) — and fix that root cause using its own guidance.
- If you want the loop to keep processing the remaining items, enable the node's 'Continue On Fail' setting (or set the workflow execution to continue on fail); failures are then pushed as { json: { error } } instead of thrown.
- For batch robustness, split the input so one bad item doesn't abort the whole run, or pre-validate each item upstream.
Example fix
// before — one bad item aborts the whole loop // (continueOnFail off) // after — toggle on the node so failures are captured per item // In the node settings: Settings → 'Continue On Fail' = true
Defensive patterns
Strategy: try-catch
Try / catch
try {
const out = await geminiNode.execute();
} catch (e) {
// NodeOperationError carries itemIndex on the failing item
const itemIndex = (e as NodeOperationError).itemIndex;
if (itemIndex != null) {
// isolate the bad item, continue with the rest
}
throw e;
} Prevention
- Enable 'Continue On Fail' on the Gemini node so one bad item doesn't abort the batch — failures surface as { json: { error } } rows.
- Pre-validate each item's prompt/model/binary upstream so inner operations rarely throw.
- Run with a small batch first to catch per-item issues before scaling up.
When it happens
Trigger: Any inner operation throws (model validation, API HTTP error, upload failure, malformed response) on item i, and the workflow/execution settings do not have 'Continue On Fail' enabled. The original error type and description are preserved on the wrapped error.
Common situations: One item in a batch has a bad prompt / model / binary while others are fine; the upstream API rate-limits or returns 4xx for one request; a credential is expired so every item fails on the first one.
Related errors
- The operation "${operation}" is not supported!
- Model ${model} is not supported for image generation
- A non-empty prompt is required.
- A non-empty prompt is required.
- Model ${model} is not supported for video generation. Please
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/a933778672b9ba0f.
Report an issue: GitHub.