title: jquery $ajax + jsonp 404 error from Server showing success
body: <p>(I think this may be a bug in jquery, not sure)</p>
  
  <p>If I do an ajax call with jQuery like so:</p>
  
  <pre><code>    $.ajax({
          type: "GET",
          url: url,
          dataType: "json",
          crossDomain: true
      }).done((result) =&gt; {
          if (result == null) {
              d.resolve();
              return;
          } else if (result.Results != null) {
              if (!$.isArray(result.Results)) {
                  d.resolve([result.Results]);
                  return;
              } else {
                  d.resolve(result.Results);
                  return;
              }
          } else {
              if (!$.isArray(result)) {
                  d.resolve([result]);
                  return;
              }
          }
  
          d.resolve(result);
      }).fail((e, description, error) =&gt; {
          d.reject(error);
      });
  </code></pre>
  
  <p>So the fail function calls if the server returns 404 or 403 or whatever. But the server is REST so it correctly, if it can't find anything, returns "not found" but will also have the error description in the body.</p>
  
  <p>Oddly jQuery's e property in the fail method (yes, typescript, but regular does the same) has e.status == 200 and statusText = "success" even though it failed. The values should be a 403 or 404 for the status, the responseText should be whatever came back. </p>
  
  <p>(all of this works fine without jsonp btw.) </p>
  
  <p>So my question is, how do I get it to show me the real return value from the server and the actual descriptive error message that was in the function it claims it didn't execute?</p>
  
  <p>Thanks!</p>