0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Merge pull request #3686 from sebgie/issue#3660

Improve error handling for authentication
This commit is contained in:
Hannah Wolfe 2014-08-08 14:25:40 +01:00
commit 0c7b6f3413

View file

@ -25,7 +25,12 @@ var ApplicationRoute = Ember.Route.extend(SimpleAuth.ApplicationRouteMixin, Shor
},
sessionAuthenticationFailed: function (error) {
this.notifications.showError(error.message);
if (error.errors) {
this.notifications.showErrors(error.errors);
} else {
// connection errors don't return proper status message, only req.body
this.notifications.showError('There was a problem on the server.');
}
},
sessionAuthenticationSucceeded: function () {