I have a function that catches errors And when an error occurs I check if it is an AJAX error And if this AJAX changes the status of the error to 401 Unauthorized I changed