Add toast message on failed API queries
This commit is contained in:
parent
a3765e8eee
commit
dcb521cb49
|
|
@ -36,6 +36,7 @@ function getSortOrder(refresh = true) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function(xhr, stat, err) {
|
error : function(xhr, stat, err) {
|
||||||
|
toastr.info("There was an error retrieving the current sort order.", "API Error...", {timeOut: 15000});
|
||||||
console.log(xhr.status);
|
console.log(xhr.status);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
@ -61,6 +62,7 @@ function cycleSortOrder() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function(xhr, stat, err) {
|
error : function(xhr, stat, err) {
|
||||||
|
toastr.info("There was an error retrieving the cycling sort order.", "API Error...", {timeOut: 15000});
|
||||||
console.log(xhr.status);
|
console.log(xhr.status);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
@ -101,6 +103,7 @@ function getFolderContents() {
|
||||||
toastr.remove();
|
toastr.remove();
|
||||||
},
|
},
|
||||||
error : function(xhr, stat, err) {
|
error : function(xhr, stat, err) {
|
||||||
|
toastr.info("There was an error retrieving the current folder contents.", "API Error...", {timeOut: 15000});
|
||||||
console.log(xhr.status);
|
console.log(xhr.status);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
@ -128,6 +131,7 @@ function changeFolder(path) {
|
||||||
getFolderContents();
|
getFolderContents();
|
||||||
},
|
},
|
||||||
error : function(xhr, stat, err) {
|
error : function(xhr, stat, err) {
|
||||||
|
toastr.info("There was an error setting the current folder.", "API Error...", {timeOut: 15000});
|
||||||
console.log(xhr.status);
|
console.log(xhr.status);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
@ -157,6 +161,7 @@ function updateCurrentPage() {
|
||||||
console.log(data.message);
|
console.log(data.message);
|
||||||
},
|
},
|
||||||
error : function(xhr, stat, err) {
|
error : function(xhr, stat, err) {
|
||||||
|
toastr.info("There was an error setting current page for comic.", "API Error...", {timeOut: 15000});
|
||||||
console.log(xhr.status);
|
console.log(xhr.status);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
@ -178,6 +183,7 @@ function closeComic() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function(xhr, stat, err) {
|
error : function(xhr, stat, err) {
|
||||||
|
toastr.info("There was an error closing the current comic.", "API Error...", {timeOut: 15000});
|
||||||
console.log(xhr.status);
|
console.log(xhr.status);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
@ -215,6 +221,7 @@ function showComic(comic, name) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
error : function(xhr, stat, err) {
|
error : function(xhr, stat, err) {
|
||||||
|
toastr.info("There was an error showing selected comic contents.", "API Error...", {timeOut: 15000});
|
||||||
console.log(xhr.status);
|
console.log(xhr.status);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user