Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Mongoose errors gracefully #79

Open
vergenzt opened this issue Jun 9, 2015 · 2 comments
Open

Handle Mongoose errors gracefully #79

vergenzt opened this issue Jun 9, 2015 · 2 comments

Comments

@vergenzt
Copy link
Contributor

vergenzt commented Jun 9, 2015

On lines 99, 120, and 127 in passport-local-mongoose.js, the library calls self.save() without any callback function to handle errors in saving. This led to a particularly hard-to-track-down bug for me as I've been working on my PR for #78. :(

(It turns out in the project in which I've been testing it, we had changed the User schema to make a previously optional field required, and it turned out that mongoose's validation was preventing the save, and this library couldn't update the attempts field.)

No biggie, but just thought I'd let you know.

@mvoorberg
Copy link
Contributor

This is a repeat of #58

saintedlama added a commit that referenced this issue Oct 25, 2017
Issue #79 and Bug #58, handle save() asynchronously
@nikwen
Copy link
Contributor

nikwen commented Jun 25, 2018

Seems to be fixed to me. If I missed something, correct me, otherwise this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants