Failed request when calling a webhook (Status Code 5xx)

(Santiago Blason) #1

Hello,
I’ve been using webhooks for a while now and there is one use case that I don’t know how to handle. Sometimes, the URL that im requesting is offline (server down, HTTP 500, etc). In this cases, FlowXO show me the error log (“Webhook returned error: status code = 503, message = …”), but it doesn’t let me continue after this (its like the flow “crash”).
I the flow would continue, I could check the Status Code 5xx and respond to the user with something like “We are out of service right now…”. But it seems the whole thing dies after a fail like this one.

Any help about how can I recover and let the user know about the situation?
Thanks!

(Joe Hatch) #2

If an error message (4xx, 5xx) is thrown by an External Service task the flow will stop. One workaround I believe is to make the request using the Webhooks & HTTP service to make your own request to the API.

In which case you could then add an extra task that says, if the status of the output from that webhook is not 200, then show error message.

(Santiago Blason) #3

Thanks for the soon reply Joe!
Actually, I’m using the Webhook & HTTP model (“Make a HTTP Request”). That’s why i’m having this problem. Because in this scenario, the flow stops. And I cannot check the Status Code like you describe. I thought that would be possible, but it seems that when the server is down (unreachable URL or service), the request fails in a way that FlowXO handle it as an error in the flow.
Any other idea you may have?

Thanks!
Regards,
Santiago.

(John Jackson) #4

Actually you’re right Santiago, if a HTTP request returns 500 (we do retry a few times too) then we stop the flow there and then.

You could use some sort of proxy to make the request and change the status code, but otherwise, I’m afraid it’s not possible to change, it’s the way the service is designed.

(Santiago Blason) #5

Ok John, sad to know.
Do you have in your roadmap near by in the future, to change this design of add the option to “catch” the 5xx status from our side (in the flow)? It could be really helpful when an “out of service / server down” situation happens.

(John Jackson) #6

It is on our radar, we know it’s something customers encounter and need to handle. I can’t say for definite if/when we can fix this or change, but I hear you. Thanks for the feedback.

(Joe Hatch) #7

John, would an intermediary service like Runscope be the workaround here?

(John Jackson) #8

I was thinking Runscope but then I don’t know if there’s a way to sort of patch the status code? Maybe there is, I bet Runscope could do this.

Here’s the link Santiago: https://www.runscope.com/

(Santiago Blason) #9

Thanks for the tip guys, I will have a look at it :wink:

(Joe Hatch) #10

I’m just going off of the top of the dome here, and might have to do some research to confirm…
But if I was trying to do this, I would maybe set up a Runscope Test to confirm the service’s availability - I believe this test can be triggered by a URL, so I’d send the webhook to action the test (which would in itself return a 200 status, but would also contain the error status of the service) then conditional logic on the flow applied using this service status ID.

#11

This just caused a huge problem for me yesterday. Can you please prioritize better error handling? One area where Zapier really kicks your ass is pausing things when there is an error and having a way to manually retry once the error is fixed. The fact that you have ZERO error handling really makes it difficult to rely on you. How is fixing this not one of your top top priorities, especially as this has been reported almost 2 years ago?

(Daniel Beckett) #12

Hi @candle

Sorry about the frustration that you’ve ran into due to not having some error handling features built in.

Better error handling is certainly something we’d love to implement at some point and have it down as a potential project for future development. The team have been hard at work adding great new features to Flow XO since it first launched and we try to put out regular updates.

There are so many amazing ideas out there which we’d love to develop on but unfortunately this all takes time. Hearing feedback from users like yourself certainly helps us decide on what projects to focus on though so thanks for the feedback. I’ll be sure to pass it on to the rest of the team here :slight_smile: