Is there a way I can listen to request of type "document" and display error by catching it.
In safari i see the request under tab "Document" and in Mozilla is the request under "HTML"
Below is the code i have tried but it does not work
jQuery(document).ajaxComplete(function( event, xhr, settings ) {
if(xhr.status == 403){
console.error('403 response');
}
});
Any help on how to catch such error will be really great, Thanks.