n8n-io/n8n · error · NodeOperationError
Error executing tool: ${(error as Error).message}
Error message
Error executing tool: ${(error as Error).message} What it means
Catch-all NodeOperationError thrown by the ToolExecutor node when executing the selected tool (single tool or tools within a toolkit) raises any exception. The for-loop over toolInputs and the per-tool executeTool calls are wrapped in try/catch; the catch re-throws with 'Error executing tool: <message>', normalizing arbitrary tool errors into a NodeOperationError.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/ToolExecutor/ToolExecutor.node.ts:192
metadata: buildResponseMetadata(response, 0),
};
}
const result = await executeTool(toolkitTool, getQueryData(toolName) ?? {});
resultData.push(result);
}
}
} else {
// Handle single tool
if (!toolName || toolName === tool.name) {
const toolInput = getQueryData(toolName || tool.name);
const result = await executeTool(tool, toolInput ?? {});
resultData.push(result);
}
}
}
} catch (error) {
throw new NodeOperationError(
this.getNode(),
`Error executing tool: ${(error as Error).message}`,
);
}
return [resultData];
}
}
View on GitHub (pinned to 5ac6606e81)
Solutions
- Read the appended error.message to identify the underlying tool failure.
- Ensure the query arguments match the tool's input schema (field names and types).
- For API-backed tools, verify credentials, rate limits, and endpoint availability.
- Run the tool in isolation with the same arguments to reproduce, then fix the argument shape.
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate arguments against the tool's schema before calling executeTool.
Try / catch
try {
for (const tool of toolInputs) { ... await executeTool(tool, args); }
} catch (e) {
if (e instanceof NodeOperationError && e.message.startsWith('Error executing tool:')) {
// inspect suffix, decide retry vs skip vs fail item
} else throw e;
} Prevention
- Match tool arguments to the tool's input schema before execution.
- Verify credentials and rate limits for API-backed tools.
- Test tools in isolation with representative arguments.
When it happens
Trigger: Any error thrown inside the tool execution loop (toolkit getTools, executeTool, schema conversion, the tool's own run) is caught and re-thrown. Fires when the underlying LangChain tool raises: bad arguments, upstream API failure, zod schema validation failure, permission errors.
Common situations: Tool arguments do not match its schema; the tool's backend API rejects the call (auth, rate limit, not found); a custom tool implementation throws; zod validation fails when converting a string input to the tool's ZodObject schema.
Related errors
- Guardrail validation failed: ${error instanceof Error ? erro
- No tool inputs found
- Failed to list ChromaDB collections: ${errorMessage}
- Error connecting to ChromaDB: ${message}
- Error inserting documents into ChromaDB: ${errorMessage}
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/6d5608022790aee5.
Report an issue: GitHub.