I am using the 2.3.1.min version of the jquery-jsonp library found here: https://github.com/jaubourg/jquery-jsonp and it works as expected, namely the error function fires when an error occurs. However, I cannot to seem to display the error encountered. I checked the docs on github project but could not find an answer.
Is this a limitation? Or am I not calling the right object?
My implementation..
The url parameter below is set to return a 404 page on purpose. Chrome dev tools shows a 404 response, but I cannot seem to capture that result..
<script type="text/javascript">
$.jsonp({
url: 'http://apps.mydomain.com/Service/NonExistant?&max=4&format=json',
callbackParameter: "callback",
error: function(xOptions, textStatus){
// this lines returns "error"
console.log(textStatus);
// this returns the Object (but expanding it reveals no indication of error code / message)
console.log(xOptions);
},
success: function(json, textStatus) {
Populate(json); // this works fine
}
});
</script>