diff --git a/src/js/client.js b/src/js/client.js index 3b183bde1..852d251c4 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -178,16 +178,18 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout this.setToken(localStorage.token); } - Client.prototype.error = function (error) { + Client.prototype.error = function (error, action) { var message = ''; + console.error(error); + if (typeof error === 'object') { message = error.message || error; } else { message = error; } - Notification.error({ title: 'Cloudron Error', message: message }); + this.notify('Cloudron Error', message, true, 'error', action); }; // handles application startup errors, mostly only when dashboard is loaded and api endpoint is down