From e3b7d9351fa1f0dd8bd4dd5609d4399625a284a4 Mon Sep 17 00:00:00 2001 From: Junior Date: Sun, 22 Nov 2026 14:24:26 -0500 Subject: [PATCH] Add error handling if there is a problem getting the task list --- js/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/main.js b/js/main.js index 77c3193..a70c51c 100644 --- a/js/main.js +++ b/js/main.js @@ -210,6 +210,10 @@ function getTasks() { url: 'ajax/task-list.php', dataType: 'json', success: function(data, stat, jqo) { + if ( data.error ) { + toastr.error(data.message, "Error retrieving task list"); + return; + } $("#form_showall").prop('checked', data.showalltasks); let show = ""; data.tasks.forEach(function(task, index) {