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)