{"record":{"id":"14ae71ae63bc8790","repo":"n8n-io/n8n","slug":"errormessage","errorCode":null,"errorMessage":"${errorMessage}","messagePattern":"\\$\\{errorMessage\\}","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/mcp/McpClient/McpClient.node.ts","lineNumber":333,"sourceCode":"\t\t\t\t} catch (e) {\n\t\t\t\t\tconst errorMessage =\n\t\t\t\t\t\te instanceof ZodError ? prettifyError(e) : e instanceof Error ? e.message : String(e);\n\t\t\t\t\tif (this.continueOnFail()) {\n\t\t\t\t\t\treturnData.push({\n\t\t\t\t\t\t\tjson: {\n\t\t\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\t\t\tmessage: errorMessage,\n\t\t\t\t\t\t\t\t\tissues: e instanceof ZodError ? e.issues : undefined,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpairedItem: {\n\t\t\t\t\t\t\t\titem: itemIndex,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tthrow new NodeOperationError(node, errorMessage, {\n\t\t\t\t\t\titemIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn [returnData];\n\t\t} finally {\n\t\t\tawait client.result.close();\n\t\t}\n\t}\n}\n","sourceCodeStart":315,"sourceCodeEnd":345,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/mcp/McpClient/McpClient.node.ts#L315-L345","documentation":"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.","triggerScenarios":"Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpClient/McpClient.node.ts:333 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","contentChangedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}