How to catch a network error exception?


I would like to know what is the recommended way to catch network errors when doing API calls in Codeless. I haven’t found any how-to page or any support forum on this subject.

The idea is for my mobile app to handle cases when either there is no connection at all, or the connection is so slow that the request ends in a timeout.

I would like to know what to look for in the error, using a try…catch block.

Thanks for your reply.

Hello @Nicolas_REMY

Is this way work for you?


Thanks @viktor.liablin ,

Does it work the same way for a call to the Backendless server (I mean if making a Users API call or a Data API call) ?


With Data API and Users API blocks, it should work.
Play with it.


Wonderful, thanks.