JQUERY AJAX 500 Gestion des erreurs

$.ajax({
    statusCode: {
        500: function() {
          alert("Script exhausted");
        }
     }
});
Prasad Gayan