I create all my APIs with n8n and it rocks.
Most of my API are made with a webhook node as a starter, and respond to webhook as a finisher.
I use a lot of HTTP nodes to.
Sometimes my API Calls fails.
Then i use âcontinue - error outputâ parameters, and use again a respond to webhook node to send the error back.
My issue is that the respond to webhook node send a 200 with an error.message.
Is there a way to throw an error with a respond to webhook node ?
Under the respond to webhook extra options you can specify a specific status code, so you can return 400 or 500 status kits for your case depending on where the issue happened.
I just posted about custom API air handling that checks the parameters and returns custom error codes based on that with a schema. That post is below. Maybe the work flow attached will help you out