title: JSONP request error handling
body: <p>I'm making an ajax jsonp request, but the failure error handling wont work. If the request is 404 or 500 it won't handle the error.</p>
  
  <p>I've been looking around to find an answer to this, but can't find anything. There seems to be a solution with <a href="http://code.google.com/p/jquery-jsonp/">http://code.google.com/p/jquery-jsonp/</a>, but I can't find any examples on how to use it.</p>
  
  <pre><code>function authenticate(user, pass) {       
      $.ajax ({
          type: "POST",
          url: "url",
          dataType: 'jsonp',
          async: false,
          //json object to sent to the authentication url
          data: {"u": userid, "p": pass},
  
          success: function (data) {
              //successful authentication here
              console.log(data);
          },
          error: function(XHR, textStatus, errorThrown) {
              alert("error: " + textStatus);
              alert("error: " + errorThrown);
          }
      })
  }
  </code></pre>