fix: enhance error output validation to detect incorrect configurations

- Add validateErrorOutputConfiguration method to detect when multiple nodes are incorrectly placed in main[0]
- Fix checkWorkflowPatterns to check main[1] for error outputs instead of outputs.error
- Cross-validate onError property matches actual connection structure
- Provide clear error messages with JSON examples showing correct configuration
- Use heuristic detection for error handler nodes (names containing error, fail, catch, etc.)
- Add comprehensive test coverage with 16+ test cases
- Bump version to 2.12.1

Fixes issues where AI agents would incorrectly configure error outputs by placing multiple nodes in the same array instead of separating them into success (main[0]) and error (main[1]) paths.

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-09-22 21:05:27 +02:00
parent c5aebc1450
commit 1a926630b8
11 changed files with 3117 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "n8n-mcp",
"version": "2.12.0",
"version": "2.12.1",
"description": "Integration between n8n workflow automation and Model Context Protocol (MCP)",
"main": "dist/index.js",
"bin": {