mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-18 08:23:07 +00:00
Fixed critical bug where n8n_update_partial_workflow failed with "request/body
must NOT have additional properties" error when workflows had no settings or
only non-whitelisted settings.
Root Cause:
- cleanWorkflowForUpdate() was sending empty settings: {} objects
- n8n API rejects empty settings as additional properties violation
- Occurred when workflow had no settings or only filtered properties
Changes:
- Modified cleanWorkflowForUpdate() to delete settings property when empty
- Enhanced applyUpdateSettings() to prevent creating empty settings
- Fixed 3 incorrect tests expecting empty settings objects
- Added 2 comprehensive tests for edge cases
Testing:
- All 75 unit tests in n8n-validation.test.ts passing
- Build and type checking successful
- New tests cover all empty settings scenarios
Related: #431, #248
Related n8n issue: n8n-io/n8n#19587
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en