$.ajax 404 status = 0

$.ajax 404 status = 0

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.

  1.         $.ajax({
  2.             type: 'GET',
  3.             url: 'https://server/api/rest/invalidurl',
  4.             dataType: 'json',
  5.             xhrFields: {
  6.                 withCredentials: true
  7.             },
  8.             success: function(data) {
  9.                 alert(data);
  10.             },
  11.             error: function(jqXHR, textStatus, errorThrown) {
  12.                 alert(jqXHR.status);
  13.             }
  14.         });