Files
n8n-mcp/tests
czlonkowski b0279bd11f fix: resolve 5 bugs in n8n_manage_datatable row operations and error handling
Fix critical issues found during staging QA testing:

1. data parameter serialization: MCP transport sends JSON as strings —
   added z.preprocess coercers (coerceJsonArray, coerceJsonObject,
   coerceJsonFilter) to parse string→JSON before Zod validation

2. filter/sortBy URL encoding: n8n API requires URL-encoded query params —
   added encodeURIComponent() for filter and sortBy in getRows/deleteRows

3. json column type: n8n API only accepts string|number|boolean|date —
   removed json from enum in types, Zod schema, tool definition, and docs

4. 404 error messages: N8nNotFoundError was wrapping API messages in
   "Resource with ID <message> not found" — now passes through cleanly

5. Unit test expectations updated for URL-encoded filter/sortBy values

Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 22:03:07 +01:00
..