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:
parent
0a9bde7702
commit
473065c61b
1 changed files with 6 additions and 1 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Reference in a new issue