Repeat loop api call returning 404

Hi all :slight_smile:
I have a repeat-loop that makes an api call every cycle.

Now there is an item that throws a 404 on the api call and the loop stops…

Is there a way to be able to continue/to skip that item and move on? Because now the script stops at the error item.

Try putting your api call inside a Try/Catch action.

Hi Ken,
just tried that. but it didn’t help…


Add the Catch, but leave it empty. If the api errors, it goes to the catch, but then does nothing.

Like this?
Still doesn’t work…


Alright, I moved the Catch to beneath the api call like this:

Now it doesn’t throw an error anymore but the loop does not continue…

API Action failures don't throw an Exception, hence Try/Catch doesn't work

There's a feature request for this issue:

If the loop stops after a 404 error, you need to untick the "Pass errors" checkbox on the API Action - this is because once an "error" happens, such API response is proxied to the actual response of your Wappler app (due to the "Pass errors" option, which is ticked by default)

To verify if an error occured with that checkbox unticked, one would need to check the status code of the API Action (select status code on the Data Binding Picker)


Thanks Apple!
That worked great. The loop continues now.

Me happy :slight_smile: