From c9c910ab7cb5ad637ee7d01abf9e1a832ca088ff Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Sun, 7 Aug 2022 10:21:08 +1200 Subject: [PATCH] UI: Better error handling when connection to server is broken --- server/ui-src/mixins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ui-src/mixins.js b/server/ui-src/mixins.js index c1604f0..494a64b 100644 --- a/server/ui-src/mixins.js +++ b/server/ui-src/mixins.js @@ -27,7 +27,7 @@ const commonMixins = { // Ajax error message handleError: function (error) { // handle error - if (error.response) { + if (error.response && error.response.data) { // The request was made and the server responded with a status code // that falls out of the range of 2xx if (error.response.data.Error) {