I am requesting an ajax url that results in a 500 HTTP header. I expect this to call 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 does not work in chrome and firefox.
What am I doing wrong?
This is the latest jquery 1.4.X for reasons that I cannot upgrade to later versions.
The response sends an HTTP code of 500, an application like content / json, and content:
jsonp1310063232212 ({"error": {"reason": "User not found"}})
source share