title: Why won't jQuery call my Ajax error handler?
body: <p>I have the following jQuery Ajax call (There are no other global settings/handlers): </p>
  
  <pre><code>$.ajax( { 
     url: "http://www.blah.com/url/does/not/exist", 
     type: "get",
     data: someData,
     dataType: "json",
     error: function (xhr, msg, ex)
     {
         alert("Failed: " + msg);
     },
     complete: function (xhr, msg)
     {
         alert("Done: " + msg);
     }
  </code></pre>
  
  <p>I would expect my error handler to be called, but instead the <code>complete</code> event fires and the alert displays <code>Done: success</code>. In my Javascript console, I see the following message: </p>
  
  <pre><code>XMLHttpRequest cannot load http://www.blah.com/url/does/not/exist. 
  Origin null is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <ol>
  <li>Why won't my error handler get called?</li>
  <li>What is the meaning of the <code>Origin</code> message logged to the console?</li>
  </ol>
  
  <p>Thanks!</p>