I would like to add (default) action when an error occurs and it's not (403, 500 or 410 code):
$.ajaxSetup({
statusCode: {
403: function () {
window.location = '@Url.Action("LogOn", "Account", new {area = "", msg = "forbidden", returnUrl = HttpContext.Current.Request.RawUrl})' + window.location.hash;
},
500: function() {
window.location = '@Url.Action("AccessDenied", "Error")';
},
410: function() {
window.location = '@Url.Action("Deleted", "Error")';
}
// ANY OTHER ERROR CODE - but it doesn't work, how can i do it?
if not any above and it's an error then =>
window.location = '@Url.Action("Index", "Error")';
}
});