I'm trying to catch if the website is accidentally making a cross domain call (for example if the user types the IP in the url instead of the domain. (This is a commercial, installable app so I don't have IIS control to set up any forwarding, etc.). This doesn't work:
error: function (x, e) {
// If the web service failed for any of the reasons below, then we
// call the custom error dialog display function with the response
// text passed back from the erro
if (x.status === 405) {
alert("405 error")
}
}
Is there any way in javascript to catch the 405 error?