mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-22 10:23:08 +00:00
fix: filter out description field in workflow updates (issue #431)
Root Cause: - n8n recently added a `description` field to workflows - The field is returned by GET /workflows/:id endpoint - But PUT /workflows/:id rejects it with "additional properties" error - Our cleanWorkflowForUpdate() wasn't filtering it out The Fix: 1. Added `description` to the list of removed fields in cleanWorkflowForUpdate() 2. Added `description` field to Workflow type definition 3. Added test case to verify description field is excluded Code Review Improvements: - Removed diagnostic logging code (was only needed for debugging) - Improved comment accuracy in type definition - Added comprehensive test coverage for description field Testing: - Build succeeds - New test passes: "should exclude description field for n8n API compatibility" - All unit tests pass - Integration tests confirmed fix works with real n8n API Related: #431 🤖 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
This commit is contained in:
@@ -140,6 +140,7 @@ export function cleanWorkflowForUpdate(workflow: Workflow): Partial<Workflow> {
|
||||
// Remove fields that cause API errors
|
||||
pinData,
|
||||
tags,
|
||||
description, // Issue #431: n8n returns this field but rejects it in updates
|
||||
// Remove additional fields that n8n API doesn't accept
|
||||
isArchived,
|
||||
usedCredentials,
|
||||
|
||||
Reference in New Issue
Block a user