diff --git a/src/main/resources/static/js/APITester.js b/src/main/resources/static/js/APITester.js index c9aaead..fbdeafa 100644 --- a/src/main/resources/static/js/APITester.js +++ b/src/main/resources/static/js/APITester.js @@ -776,6 +776,8 @@ class APITester { }, error: function (response, textStatus, errorThrown) { me.hideLoadingOverlay(); + $('.toast-body').text(response.responseJSON.error); + $('.toast').toast('show'); }, complete: function () { let endTime = new Date().getTime(); @@ -804,6 +806,8 @@ class APITester { }, error: function (response, textStatus, errorThrown) { me.hideLoadingOverlay(); + $('.toast-body').text(response.responseJSON.error); + $('.toast').toast('show'); }, complete: function () { me.renderCollections(); @@ -826,6 +830,8 @@ class APITester { }, error: function (response, textStatus, errorThrown) { me.hideLoadingOverlay(); + $('.toast-body').text(response.responseJSON.error); + $('.toast').toast('show'); }, complete: function () { me.loadCollections(); @@ -845,6 +851,8 @@ class APITester { data: JSON.stringify({id: id, name: name}), error: function (response, textStatus, errorThrown) { me.hideLoadingOverlay(); + $('.toast-body').text(response.responseJSON.error); + $('.toast').toast('show'); }, complete: function () { me.loadCollections(); @@ -866,9 +874,9 @@ class APITester { success: function () { }, error: function (response, textStatus, errorThrown) { - let error = response.responseJSON; me.hideLoadingOverlay(); - alert(error.error); + $('.toast-body').text(response.responseJSON.error); + $('.toast').toast('show'); }, complete: function () { me.loadCollections(); @@ -1054,6 +1062,7 @@ class APITester { success: function (data) { }, error: function (response, textStatus, errorThrown) { + $('.toast-body').text(response.responseJSON.error); me.hideLoadingOverlay(); }, complete: function () {