I have the following code in say abcd.js:
$http({url: 'some url' , method: 'POST', data: , headers: {}
}).then(function(response)) {
.............
}, function error(response) {
..............
})
In the case of error the values of response.status = -1, response.statusText ="". Basically no useful info. However in the Chrome Debugger console output I see:
POST: Some URL/analysis.php net::ERR_NETWORK_IO_SUSPENDED
The chrome debugger extracts the real error from the analysis.php network packet and displays it. Q1: Why is that the status and statusText dont have useful info?
Q2: Is it possible to get programmatically the network error? In the above failure example I would get it as ERR_NETWORK_IO_SUSPENDED.
Q3: Programmatically is there any other way to get the network error when $http() fails?