From 0889c3f4c2577baae0dd54afed9e8490e2396d51 Mon Sep 17 00:00:00 2001 From: Vadim Yakhin Date: Wed, 21 Oct 2020 11:33:42 -0300 Subject: [PATCH] Fix error not being shown in error box (#59) --- templates/admin/controls/synchronize.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/admin/controls/synchronize.php b/templates/admin/controls/synchronize.php index 6b28c9b..fa20c42 100644 --- a/templates/admin/controls/synchronize.php +++ b/templates/admin/controls/synchronize.php @@ -115,12 +115,13 @@ function showErrors(message) { }; function onError(jqXHR, textStatus, errorThrown) { + var errorMsg; try { errorMsg = JSON.parse(jqXHR.responseText).message; } catch (e) { errorMsg = jqXHR.responseText; - showErrors(errorMsg); } + showErrors(errorMsg); }; function onIndexBatchSuccess(response) {