Are you testing the event.isError value?
The event.status should have the HTTP response code from the server. These are codes like 200 - Success, 404 - Resource not found, 500 - Internal Server Error. The presence of one of these codes means that your app successfully connected to a web server and executed an HTTP request.
However, there are other conditions where your app cannot execute an HTTP request. It could be you’re connecting to a server that doesn’t have a web server running on the port you’re connecting to (80 for HTTP, 443 for HTTPS, or user-specified), or there is a web server, but it’s hung up and not responding, or the server could be down, or there is a networking problem preventing you from reaching the server. All of these conditions, the .isError parameter should be true, and the .status value is irrelevant. I would treat a -1 as the value when .isError is true since we couldn’t complete a valid HTTP request.
Rob