My php code:
throw Exception("Lorem !", 403);
now I want by ajaxError, get Lorem !
:
$(document).on('ajaxError', function(el, jqxhr) {
console.log(xhr.statusText);
console.log(xhr.responseText);
});
that xhr.statusText
give me Forbidden
message, not Lorem !
.
and xhr.responseText
give all html code of 403 Page !
How can give Lorem !
text instead?