I do an API call to Stripe to check if a customer id exists (using Retrieve a Customer).
If there is an error “No customer found”, I must perform some actions to fix it. But with an error, the workflow stops.
How could we catch errors in the API Workflows ? how can I trigger another worflow only if an error occurs ?
If we can’t, @emmanuel do you plan to let us deal with Errors ? Once configured for an API, all the Errors responses are formatted the same way, whatever the call we make.
At the moment our option is to install a ‘timeout’ (scheduled wf) in order to validate if the operation was successful. In other words, if the validation operation takes 10 seconds, a scheduler at 30 seconds is executed to check if the operation has written the data correctly.
I have created a ticket last week for this reason. They tell me that actually there’s no way to handle error. You cannot also set another step to see if an empty (example ID) on further step of the workflow because the workflow stop on the error. No timeline on a fix for that.
The only workaround I found is like @JohnMark Say.
Ok, I think I understand the issue now. This thread from 2.5 years ago seems to be about the same thing.
While far from ideal, until the issue is officially addressed by Bubble, another approach might be to implement a “proxy relay” endpoint - i.e. a “middleman” endpoint which sits between Bubble and the “true” endpoint (Stripe in this case). For certain “critical” API workflows, it might be worth the effort.
I fiddled around and was able to implement a no-code solution to fetch a customer from Stripe with error handling using Integromat for the proxy endpoint…
A quick follow-up… It’d probably be best to create a separate custom event for the “Send email” instead of just an action. That way, the error handling logic resides in its own workflow (for better app organization and SOC).
I know it’s been brought up (many times) before, but it would sure be nice to see an official “roadmap”, or at least a list of requested features, and better yet, to be able to influence priority by upvoting. Unfortunately, Bubble doesn’t seem transparent in that regard.
(The forums are great for discussion, but I don’t even know how to formally submit a feature request - only bug reports.)
I had to refresh my memory, but it appears you can specify the return code in Integromat. I opted to return a 200 to Bubble and simply send back a custom string called “error” as the Stripe customer id; but it appears the original error code could indeed be sent back to Bubble as a param. Here’s how I set up the webhook response in Integromat for my quick test…