diff options
Diffstat (limited to 'web-ui/app/js/helpers')
-rw-r--r-- | web-ui/app/js/helpers/monitored_ajax.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web-ui/app/js/helpers/monitored_ajax.js b/web-ui/app/js/helpers/monitored_ajax.js index 0f851c7a..0068e10c 100644 --- a/web-ui/app/js/helpers/monitored_ajax.js +++ b/web-ui/app/js/helpers/monitored_ajax.js @@ -51,7 +51,9 @@ define(['page/events', 'views/i18n'], function (events, i18n) { return $.ajax(url, config).fail(function (xmlhttprequest, textstatus, message) { if (!config.skipErrorMessage) { - var msg = messages[textstatus] || 'unexpected problem while talking to server'; + var msg = (xmlhttprequest.responseJSON && xmlhttprequest.responseJSON.message) || + messages[textstatus] || + 'unexpected problem while talking to server'; on.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n(msg) }); } }.bind(this)); |