Skip to content

Commit

Permalink
Show error message when sending password request mail fails
Browse files Browse the repository at this point in the history
It used to fail silently (client only displays error when a message is available).
  • Loading branch information
uwolfer committed Oct 23, 2014
1 parent a799a23 commit 619c7f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/users/users.password.server.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ exports.forgot = function(req, res, next) {
res.send({
message: 'An email has been sent to ' + user.email + ' with further instructions.'
});
} else {
return res.status(400).send({
message: 'Failure sending email'
});
}

done(err);
Expand Down

0 comments on commit 619c7f2

Please sign in to comment.