If error was unauthorized, do a reload.

This commit is contained in:
Isaac Connor 2021-05-12 10:31:22 -04:00
parent bdae5dd9f8
commit 363b017977
1 changed files with 3 additions and 0 deletions

View File

@ -357,6 +357,9 @@ if ( currentView != 'none' && currentView != 'login' ) {
.done(setNavBar) .done(setNavBar)
.fail(function(jqxhr, textStatus, error) { .fail(function(jqxhr, textStatus, error) {
console.log("Request Failed: " + textStatus + ", " + error); console.log("Request Failed: " + textStatus + ", " + error);
if (error == 'Unauthorized') {
window.location.reload(true);
}
if ( ! jqxhr.responseText ) { if ( ! jqxhr.responseText ) {
console.log("No responseText in jqxhr"); console.log("No responseText in jqxhr");
console.log(jqxhr); console.log(jqxhr);