diff --git management/univention-management-console/www/management/error.html management/univention-management-console/www/management/error.html index 2fdb520e62..08ca4e7a1d 100644 --- management/univention-management-console/www/management/error.html +++ management/univention-management-console/www/management/error.html @@ -23,12 +23,8 @@ setTimeout(function() { /* dependency problem umc/dialog is not yet require()d in umc/tools*/ var data = json.parse(entities.decode(%ERROR%)); var info = tools.parseError(data); - var title = info.title || _('HTTP Error %s', info.status); - var traceback = info.traceback || ''; - var message = info.message; - - var error_message = title + '\n' + message + '\n' + traceback; - tools.showTracebackDialog(error_message, message, title).always(function() { + info.title = info.title || _('HTTP Error %s', info.status); + tools.getErrorHandler().displayError(info).always(function() { setTimeout(function() { window.location.href = data.location || '/univention/management/'; }, 1000); diff --git management/univention-web/js/tools.js management/univention-web/js/tools.js index 158e9831de..57b16363dc 100644 --- management/univention-web/js/tools.js +++ management/univention-web/js/tools.js @@ -485,7 +485,7 @@ define([ return this._request(lang.mixin({ url: '/univention/' + command, data: _body, - errorHandler: this.__getErrorHandler(handleErrors), + errorHandler: this.getErrorHandler(handleErrors), flavor: flavor, headers: {}, withCredentials: false, @@ -563,7 +563,7 @@ define([ } }, - __getErrorHandler: function(handleErrors) { + getErrorHandler: function(handleErrors) { var custom = {}; if (handleErrors === false) { custom = { @@ -670,7 +670,7 @@ define([ displayTraceback: function(info) { topic.publish('/umc/actions', 'error', 'traceback'); - tools.showTracebackDialog(info.traceback, info.title + '\n\n' + info.message, null, custom.hideInformVendor); + return tools.showTracebackDialog(info.traceback, info.title + '\n\n' + info.message, null, custom.hideInformVendor); } }, custom); return errorHandler; @@ -865,7 +865,7 @@ define([ if (401 === info.status) { return; /*already handled*/ } - this.__getErrorHandler(handleErrors ? handleErrors : {}).error(info); + this.getErrorHandler(handleErrors ? handleErrors : {}).error(info); }, showTracebackDialog: function(message, statusMessage, title, hideInformVendor) {