Error Handling in API Workflows

Hello @nicolas.bousson

please edit your post, and add @eve.

1 Like

Okay I’m not alone in this :nerd_face:
Hope in 2021, backend workflow will handle errors such as external API

1 Like

While it’s not in the spirit of no-code, I’ve worked around this issue building the API into Lambda and then providing a success param in the response. This bypasses the API Connector plugin which is a shame but at least you can then handle the error. Well you’re still using the API connector but usint it to connect to the Lambda through API Gateway.

3 Likes

Sounds like a viable solution. Since a lot of us here are no-coders (myself included), would you be able to write a step-by-step tutorial on how to handle the API errors via API Connector-AWS API Gateway-AWS Lambda, if timer permits? I would be eternally grateful.

2 Likes

Hi, I’d be happy to help, I just need to find some time for it but I’ll do my best to get round to it.

3 Likes

@emmanuel - can we have an update on this? In fact, now that you’ve revised the payment plans to something more commercial, perhaps you could publish an actual roadmap so we can see what is being prioritized in the months ahead, and ideally vote on features?

Another idea would be to enable your feature sponsor program to be crowdsourced - i.e. anyone interested can pay a nominal sum, e.g. £20, and once the cost price is reached it’s implemented straight away. If interest isn’t high enough, in given timescales, the money is refunded or credited to users’ accounts. You could make the sponsored feature exclusively available to those who have funded it, for a period, to incentivize participation.

6 Likes

I have tested the method given by Shaun.
Using the “An element has an error running a workflow” option on the button that triggers the api helped me trap the JSON error (occurring on the api call) and hence giving a cleaner message to the user.
Thank you so much @shaun !

1 Like

I really need this feature. I need to charge a list of user invoices and the process stalls if an error occurs while the API Workflow is running to charge each user.

@Phill.NullaCode @jeanphilippe.borel @stu_bowes @nicolas.bousson

3 Likes

This is good news but doesn’t go all the way for lots of the use cases on this thread.

Backend Workflows (formerly API Workflows) fail silently and with no out-the-box means of detection / error handling. This is still the case today and I don’t think that @nicolas_dap 's solution has been bettered, other than just rebuilding your backend ops away from Bubble.

Please, please Bubble - until there’s a way of natively handling things going wrong on the backend we all present a reliability risk to our customers.

And if anyone has any other workarounds it would be great to hear them.

7 Likes

I’m running into this issue as well. I have a backend workflow and when it fails, it fails silently and I cannot take any actions.

2 Likes

Thank you @mevist77 This truly works like charm!

1 Like

Any update on how to do capture an error in a backend workflow that’s not specifically related to an external API call?

2 Likes

Hi … Any update on how to do capture an error in a backend workflows???

1 Like

Hi! Any updates on this?

1 Like

Bubble is pretty great, but this is a big miss. It’s sort of puzzling to me that it isn’t viewed as absolutely critical for anyone working with backend workflows and api workflows. The built in logs are barely adequate, and I (like many in this thread) have added a log table to help understand what’s happening behind the scenes.

My two biggest asks for Bubble are
1: better ability to manipulate data/more complex calculations
2: better logging and error handling in workflows

As is always the case, you don’t learn all the details until you start digging, but while I feel fairly committed for now, I would definitely not have selected bubble for our app if I understood how poor error catching and handling are on the back end.

5 Likes

I realize this comment is almost a year old, but I think the best way to handle something like this would be to have some additional bookkeeping where you mark something as “done” in the last step of the workflow, and have another workflow looking for things you expect to be done that aren’t, and then take appropriate action (notify you, the user, reschedule the API workflow, etc).

Good luck!

2 Likes

Hi @emmanuel,

This is 2023 and backend workflow error handling is still a big thing to enable Bubble complete powers.

Is there a way that could be part of a roadmap?

Bumping this again. Especially for scheduled/auto-charge payment processing this is a nightmare. I’ve tried the “Include errors in response and allow workflow actions to continue” but then I have no idea what the result of the payment attempt was.

For whoever comes next - I think I’m going to anticipate the API call to fail and cancel the error if it doesn’t. More specifically - right before I attempt the payment, I’ll schedule another workflow that sends the error message for 1 min in the future, and then immediately cancel it if the payment does go through

+1 on this feature. Critical for a reliable app.