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

Improve error handling for authentication

closes #3660
- added wrapping in JSON API format to error500()
- added client side handling
This commit is contained in:
Sebastian Gierlinger 2014-08-08 09:44:24 +02:00
parent 0a9bde7702
commit 473065c61b

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 () {