Network.Request error handling

In the terminal window I can see some nice details about network errors such as:

-1003, details: A server with the specified hostname could not be found.

-1009, details: The Internet connection appears to be offline.

 

But I can’t seem to locate a way to access this error number from within Corona.  I’d like to give more descriptive error messages such as “Check your internet connection” if it’s a -1009 or “Can’t reach the server.” if it’s a -1003.

Am I missing something or are we limited within the app to only if it failed or not?

Thanks!

Brian

Try looking at event.status in the listener function.

Dave

All I get from event.status is “-1” when there’s an error, while Corona’s terminal window gives me much a more verbose description.

I can’t say this with certainty, but it could come down to what the OS provides.  iOS isn’t OS-X, Android isn’t any of them.  Windows is different.

We may be limited by what’s provided.

Try looking at event.status in the listener function.

Dave

All I get from event.status is “-1” when there’s an error, while Corona’s terminal window gives me much a more verbose description.

I can’t say this with certainty, but it could come down to what the OS provides.  iOS isn’t OS-X, Android isn’t any of them.  Windows is different.

We may be limited by what’s provided.