Hope something like this might help u mate.. :)
error:function (xhr, ajaxOptions, thrownError){
alert(xhr.status);
switch (xhr.status) {
case 404:
// Desired Action.
}
}
complete: function(xhr, statusText){
alert(xhr.status);
}
U may get quite lot of information in the below link mate