From 7a496e3e150dd8ef0056addc41e3347647d7eef4 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 9 Sep 2024 11:35:28 +0200 Subject: [PATCH] tweak error messages --- changedetectionio/static/js/watch-settings.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/changedetectionio/static/js/watch-settings.js b/changedetectionio/static/js/watch-settings.js index 8bb9e8b3..003f4eb3 100644 --- a/changedetectionio/static/js/watch-settings.js +++ b/changedetectionio/static/js/watch-settings.js @@ -47,9 +47,12 @@ function request_textpreview_update() { namespace: 'watchEdit' }).done(function (data) { $('#filters-and-triggers #text-preview-inner').text(data); - }).fail(function (data) { - console.log(data); - $('#filters-and-triggers #text-preview-inner').text('There was an error communicating with the server.'); + }).fail(function (error) { + if (error.statusText === 'abort') { + console.log('Request was aborted due to a new request being fired.'); + } else { + $('#filters-and-triggers #text-preview-inner').text('There was an error communicating with the server.'); + } }) }