How to "branch" if HTTP request failed?

Edit: Actually, just solved a lot of problems by enabling “Full Response” in the HTTP Request node, and putting an “if” in front to check the statusMessage is equal to “OK” :slight_smile:

Describe the issue/error/question

I want to perform an HTTP request. If for some reason the HTTP request fails, I want to update something in my database

Is there any sort of Try/Catch functionality? Or an “if” that checks if the previous node ran ok?

Start -> HTTP request -> If success: Continue normally
                         If failure: Update something on database (e.g.: increment an integer "failures" on the database)

Please note I don’t want to stop the whole workflow on error. This HTTP request is just a tiny part of it, and a request failure is something that I want to handle within the workflow by design - hence I’m not totally convinced about the Error Trigger to start a new Workflow

To give a bit of context, imagine this is a sort of “website uptime monitoring” thing. I iterate through all websites present in the database and do an HTTP request for each of them - I want to mark which ones are up, and which ones are down. Such scenario is one example where a HTTP failure makes sense to be handled within the workflow

Edit: Would be nice to get the HTTP status code as well

1 Like

Hey @fishnux,

Nice to see you have worked it out with the Full Response option :smile: