From d720af6a270ea776a7bc53c851700830139b6d47 Mon Sep 17 00:00:00 2001 From: Tomasz Rondio Date: Wed, 6 Jun 2018 14:56:08 +0200 Subject: [PATCH] fixes (#37) * fix: SWP-1172 theme settings switch * add: SWP-1160 remove route error message --- client/controllers/WebPublisherManagerController.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/controllers/WebPublisherManagerController.js b/client/controllers/WebPublisherManagerController.js index aa22f887..15151a5a 100644 --- a/client/controllers/WebPublisherManagerController.js +++ b/client/controllers/WebPublisherManagerController.js @@ -205,8 +205,13 @@ export function WebPublisherManagerController($scope, publisher, modal, privileg * @description Deleting route */ deleteRoute(id) { - modal.confirm(gettext('Please confirm you want to delete route.')).then( - () => publisher.removeRoute(id).then(this._refreshRoutes)); + modal.confirm(gettext('Please confirm you want to delete route.')).then(() => + publisher.removeRoute(id) + .then(this._refreshRoutes)) + .catch(err => { + let message = err.data.message ? err.data.message : 'Something went wrong. Try again.'; + modal.confirm(message); + }); } /**