From 35912f325b02cbf80d6b87bbc5e4b0a1a3ba4f3f Mon Sep 17 00:00:00 2001 From: azivner Date: Mon, 18 Dec 2017 22:56:44 -0500 Subject: [PATCH] making sure that if AJAX request fails, then the whole operation is cancelled (previously the promise has been resolved successfully even in case of failed request) --- public/javascripts/server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/javascripts/server.js b/public/javascripts/server.js index d5e452964..82872f08c 100644 --- a/public/javascripts/server.js +++ b/public/javascripts/server.js @@ -82,6 +82,8 @@ const server = (function() { return await $.ajax(options).catch(e => { showError("Error when calling " + method + " " + url + ": " + e.status + " - " + e.statusText); + + throw e; }); }