I am requesting a URL with ajax that results in a HTTP header code 500. I would expect this to trigger the error function:
$.ajax({
url: "http://xxx",
dataType: "jsonp",
crossDomain: true,
success: function( data ) {
alert('success');
},
error: function () {
alert('error');
}
});
This works in safari, but fails in chrome and firefox.
What am I doing wrong?
This is the latest jquery 1.4.X, for reasons I cannot upgrade to later versions..
The response sends a HTTP code 500, content type application/json and contents:
jsonp1310063232212({"error":{"reason":"User not found"}})