Stéphane Tailland f49f3ec360 fix(workflow): answer when the product does not exist
MCP does not report a tool failure as a JSON-RPC error. It reports it as a
successful result carrying isError: true, with the reason as text. The node
only checked `error`, so it read the failure as data and went on to JSON.parse
the sentence "HTTP call failed with status 404" as a product. The throw is what
made the webhook answer nothing at all.

Now checks result.isError, distinguishes a missing product from any other tool
failure, and guards every parse of a payload it did not construct. Through the
facade, escalate: true becomes a task in state failed rather than a completed
one.

Also corrects this file: the earlier note said the run completed in success
with every node executing. It did not — that was the wrong execution. n8n's
executions list did not return them newest-first as assumed, and the conclusion
drawn from it sent the search to the wrong place.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 13:40:19 +02:00
2026-08-26 15:14:41 +02:00
S
Description
No description provided
266 KiB
Languages
Python 91.4%
Dockerfile 8.6%