Forum Academy Marketplace Showcase Pricing Features

How to restart API workflow when error occurs?

I need to fetch frequently data via API but the issue is that API Workflow just stops working if API gets error as an answer. But haven’t figured out yet:

  1. How to restart workflow automatically when error response occurs?
  2. How to ignore these error messages and just continue and propably send an error log message to my email.

EDIT: Found this:

" Return a 200 if condition is not met

By default, Bubble will return a 400 error if the condition you’ve set on the workflow is not met. Check this box to change this setting and return a 200 code instead. Use this when the endpoint is used in a webhook, and the emitting source expects a 200 code."

And I think that’s the solution for this.

Best regards,
Jaakko

I would appreciate if somebody could answer this. I am still getting randomly errors in API workflows causing these workflows just to stop. This is very irritaring and makes actually Bubble to feel very unreliable system.

The solution I found " Return a 200 if condition is not met" didn’t help at all and as said sometimes the reason is “app too busy” or other unexplained errors from Bubble side.

So how it would be possible to make sure that workflows stays in running mode if any random errors occurs?

1 Like

Hello,

May I know how you trigger your API endpoints, please?

Thanks for your reply!

I am fetching products from Shopify by using Scheduled API Workflow for lists (fetching this list from Shopify). To not overuse server I have limited products per page only to 5 (if I increase the amount I get very soon “app too busy warnings”. Then I repeat the process by triggering new workflow with next page etc. as long as the final page is achieved.

The problem is that to fetch for example 3000 products it takes several hours. And during this time, randomly everything stops for an error like app too busy or sometimes also for 401 error from Shopify side even credentials are ok (as they usually works).

So the error can occur also from other side (eg Shopify) and the problem is that everything stops without warnings. For example with Integromat if you get an error it gives warnings but continues trying. If no success only after 3 warnings it stops.

So this API handling is honestly “shit” from Bubble side if there is no better solution.

Thanks for the details!

As I know, Shopify sends up to 10 requests to the same endpoint in the case if Shopify doesn’t receive any answer. So, I mean it re-triggers the same request.

Can you attach a screenshot of your API endpoint and its workflows, please? It will help me.
You can blur the data. I need to see how many workflows do you have there.

1 Like

Hello Lottemind.md!

Thanks for your reply. I think I finally found the solution. It’s here:

Now trying and blessing it works :wink: