I want to catch if my AJAX call returns a 401 exception. Here is my code:
error: function(error) {
var CevapHata = error.responseText.toString();
var pos=CevapHata.IndexOf("401");
}
But when I try to cacth index of 401, there is an error as Object doesn’t support this property or method. Do you have any suggestion?
Javascript is case-sensitive, try
with a small “i”.