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:
commit
0c7b6f3413
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