mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
fix: add warnings for If/Switch node connection parameters (issue #360)
Implemented a warning system to guide users toward using smart parameters (branch="true"/"false" for If nodes, case=N for Switch nodes) instead of sourceIndex, which can lead to incorrect branch routing. Changes: - Added warnings property to WorkflowDiffResult interface - Warnings generated when sourceIndex used with If/Switch nodes - Enhanced tool documentation with CRITICAL pitfalls - Added regression tests reproducing issue #360 - Version bump to 2.22.1 The branch parameter functionality works correctly - this fix adds helpful warnings to prevent users from accidentally using the less intuitive sourceIndex parameter. Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -170,6 +170,7 @@ export interface WorkflowDiffResult {
|
||||
success: boolean;
|
||||
workflow?: any; // Updated workflow if successful
|
||||
errors?: WorkflowDiffValidationError[];
|
||||
warnings?: WorkflowDiffValidationError[]; // Non-blocking warnings (e.g., parameter suggestions)
|
||||
operationsApplied?: number;
|
||||
message?: string;
|
||||
applied?: number[]; // Indices of successfully applied operations (when continueOnError is true)
|
||||
|
||||
Reference in New Issue
Block a user