Hi,
I have noticed that if the ajax call returns 404, the jqXHR.status = 0.
Does anybody know why?In the rest of the status codes the status property is ok but for 404.
Thanks a lot.
- $.ajax({
- type: 'GET',
- url: 'https://server/api/rest/invalidurl',
- dataType: 'json',
- xhrFields: {
- withCredentials: true
- },
- success: function(data) {
- alert(data);
- },
- error: function(jqXHR, textStatus, errorThrown) {
- alert(jqXHR.status);
- }
- });