From f2c7e34c3fe71a57ae7ef1d48a9d113ab5471bf0 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Thu, 26 Nov 2015 11:14:39 +0000 Subject: [PATCH] Fix missing error on signin when server has gone away no issue - `session.authenticate` calls out to jQuery for the ajax request which then raises it's own error but returns nothing when the server is not reachable. This is a quick fix so that we don't error and can pass through to the default error handler in the authentication step. --- core/client/app/controllers/signin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/client/app/controllers/signin.js b/core/client/app/controllers/signin.js index 9c3bdd45b7..ef3ccec96c 100644 --- a/core/client/app/controllers/signin.js +++ b/core/client/app/controllers/signin.js @@ -26,7 +26,7 @@ export default Ember.Controller.extend(ValidationEngine, { this.get('session').authenticate(authStrategy, model.get('identification'), model.get('password')).catch(function (error) { self.toggleProperty('loggingIn'); - if (error.errors) { + if (error && error.errors) { error.errors.forEach(function (err) { err.message = err.message.htmlSafe(); });