How to catch a network error exception?

Hi,

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?


Regards

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) ?

@Nicolas_REMY

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

Regards

Wonderful, thanks.