n8n-io/n8n · error · NodeOperationError
${errorMessage}
Error message
${errorMessage} What it means
Generic per-item error wrapper in MCP Client execute: calling the remote tool threw (ZodError messages are prettified; other errors use their message). If continueOnFail is on, the error becomes item output JSON; otherwise it is rethrown as a NodeOperationError for the failing itemIndex.
Solutions
- Read the embedded message — it is the tool's or schema validation's own error
- Fix the tool arguments or server-side issue, or enable continue-on-fail to keep processing
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpClient/McpClient.node.ts:333 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/14ae71ae63bc8790.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpClient/McpClient.node.ts:333
} catch (e) {
const errorMessage =
e instanceof ZodError ? prettifyError(e) : e instanceof Error ? e.message : String(e);
if (this.continueOnFail()) {
returnData.push({
json: {
error: {
message: errorMessage,
issues: e instanceof ZodError ? e.issues : undefined,
},
},
pairedItem: {
item: itemIndex,
},
});
continue;
}
throw new NodeOperationError(node, errorMessage, {
itemIndex,
});
}
}
return [returnData];
} finally {
await client.result.close();
}
}
}
View on GitHub (pinned to 5ac6606e81)