Change toast.info to toast.error for failed API calls

This commit is contained in:
Junior 2026-11-08 15:14:44 -05:00
parent a6057ea3d8
commit 47c9375f10

View File

@ -5,7 +5,7 @@ $(document).ready(function() {
$("#path").click(function() { changeFolder("/"); }); $("#path").click(function() { changeFolder("/"); });
$("#sortorder").on("click", cycleSortOrder); $("#sortorder").on("click", cycleSortOrder);
$("#list").on("click", ".folder", function() { $("#list").on("click", ".folder", function() {
changeFolder($(this).data("name"), $(this).data("path")); changeFolder($(this).data("path"));
}); });
$("#list").on("click", ".issue", function() { $("#list").on("click", ".issue", function() {
$(this).parent().addClass("readborder"); $(this).parent().addClass("readborder");
@ -43,7 +43,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}); toastr.error("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);
} }
@ -69,7 +69,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}); toastr.error("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);
} }
@ -108,7 +108,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}); toastr.error("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);
} }
@ -136,7 +136,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}); toastr.error("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);
} }
@ -166,7 +166,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}); toastr.error("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);
} }
@ -188,7 +188,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}); toastr.error("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);
} }
@ -226,7 +226,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}); toastr.error("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);
} }