Hello! I’m trying to add some error handling to our internal API which is an n8n workflow. The issue im having is that im using the respond to webhook node to output data back to the node that requested it so as far as I know, I can’t use a different workflow for error handling because I can’t use a different workflow to respond to the initial webhook since n8n automatically responds with error 500 once it errors. How can I catch errors without having a giant spaghetti net pointing to 1 node?
At the moment im just using the error output on a per node basis but ideally I would just catch any error using another workflow and handle it over there…
Yea but as soon the workflow ends it responds to the webhook so offloading it via error trigger wouldn’t work
" * The workflow errors before the first Respond to Webhook node executes: the workflow returns an error message with a 500 status." as per documentation
I’m afraid that cannot work like that. The Webhook and Respond to Webhook nodes have to be part of the very same workflow.
I believe what you have built is already the best solution to accommodate both - the custom response and to trigger the Error workflow.
My understanding is your workflow does work as expected and it is just the extra connections (“spaghetti net”) that bothers you. Looks like you would have to live with that for now (unless there is something else to it I missed).