I’m using HTTP request node and sometimes I’m getting HTTP 400 errors.
The node window shows only that the request was rejected with error 400 and a stack trace, the node connected afterwards doesn’t get invoked, neither does Error Trigger in the workflow.
I’ve created a simple error workflow with an error trigger and a slack message. it tests and sends a test message to my slack channel.
I\ve set it as the error workflow for my n8n instance.
The other workflow with HTTP still errs and error handler doesn’t get invoked.
If you don’t want to stop exececution on errors you can use the Continue On Fail option suggested by @BramKn above which would do the trick and continue even on errors. You’d just need to make sure to handle the error case afterwards.
Specifically for the HTTP Request node you could alternatively use the Ignore Response Code option:
But you’d still need to then implement your own check whether the response matches your expectations or not. This could look like so:
The Function node in the above example just sets a couple of dummy URLs to use for testing, the HTTP Request and IF nodes are the ones making the request and checking how it went.
As shown above, the HTTP Request node of my “HTTP Error” flow produces a 400 status. My “Error Flow” then runs as expected and the error data is available in the Error Trigger node:
So in order to further look into the problem you have described I’d need an example workflow and error flow using which this can be reproduced.
It’s worth keeping in mind the Error Trigger would not be called when manually executing the original workflow (as in this case you’d have the error right in the UI).
have the node fail and then have the error workflow called (@MutedJam just showed above that it works fine). But there you will just receive the error, not the body. (if “Continue on Fail” and “Ignore Response Code” are not set)
or
have the node not fail, the workflow then continuing and you will get the full body (if “Ignore Response Code” is set)