From dcb521cb49353908c579885b9a66a3d8a8e55370 Mon Sep 17 00:00:00 2001 From: Junior Date: Sun, 8 Nov 2026 14:46:36 -0500 Subject: [PATCH] Add toast message on failed API queries --- js/comics.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/comics.js b/js/comics.js index f04a9f6..712eb6c 100644 --- a/js/comics.js +++ b/js/comics.js @@ -36,6 +36,7 @@ function getSortOrder(refresh = true) { } }, 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(err); } @@ -61,6 +62,7 @@ function cycleSortOrder() { } }, 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(err); } @@ -101,6 +103,7 @@ function getFolderContents() { toastr.remove(); }, 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(err); } @@ -128,6 +131,7 @@ function changeFolder(path) { getFolderContents(); }, 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(err); } @@ -157,6 +161,7 @@ function updateCurrentPage() { console.log(data.message); }, 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(err); } @@ -178,6 +183,7 @@ function closeComic() { } }, 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(err); } @@ -215,6 +221,7 @@ function showComic(comic, name) { }); }, 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(err); }