Stop and error broken?

@mike99 When you want to return errors to a webhook you use the “Respond to webhook” node and set a custom status code. You need set the webhook trigger to respond with the “Respond to webhook” node before it works.

The status code for bad request from the client (sender of webhook) is 400 and for error in the workflow is 500. You can see a list of http error code meanings here.

When I make callable API style workflows I typically make them callable from http and other workflows directly, so i use both respond to webhook and stop and error so I can always handle errors “on the other side”

I also like to use a code node to make an array of input parameter errors to return. It makes it much easier to trouble shoot when you know what fields have errors. You can see an actual implementation of that in my workflow here.

I also return a schema with parameter fail errors. That is also in the workflow i linked above.

Hope that helps!

1 Like