401 error alert

This commit is contained in:
Mo Bitar
2018-06-19 18:59:37 -05:00
parent 63d4a859df
commit 40ffa5f7b0
3 changed files with 8 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ class HttpManager {
} else {
console.error("Request error:", response);
this.$timeout(function(){
onerror(response)
onerror(response, xmlhttp.status)
})
}
}

View File

@@ -411,7 +411,7 @@ class SyncManager {
) {
this.$rootScope.$broadcast("major-data-change");
}
this.callQueuedCallbacksAndCurrent(callback, response);
this.$rootScope.$broadcast("sync:completed", {retrievedItems: this.allRetreivedItems, savedItems: this.allSavedItems});
@@ -429,7 +429,10 @@ class SyncManager {
console.log("Caught sync success exception:", e);
}
}.bind(this), function(response){
}.bind(this), function(response, statusCode){
if(statusCode == 401) {
alert("Your session has expired. New changes will not be pulled in. Please sign out and sign back in to refresh your session.");
}
console.log("Sync error: ", response);
var error = response ? response.error : {message: "Could not connect to server."};

View File

@@ -87,13 +87,12 @@ $footer-height: 32px;
top: 0;
right: 0;
z-index: 1;
width: 6px;
width: 8px;
height: 100%;
position: absolute;
cursor: col-resize;
background-color: rgba(black, 0.05);
background-color: rgba(black, 0.1);
opacity: 0;
border: 1px dashed rgba($blue-color, 0.15);
border-top: none;
border-bottom: none;