sahat / megaboilerplate

Handcrafted starter projects, optimized for simplicity and ease of use.
MIT License
3.83k stars 257 forks source link

Error changing password. Unhandled rejection ReferenceError: err is not defined #196

Open clintmod opened 7 years ago

clintmod commented 7 years ago

Got this error when trying to do a password reset:

Unhandled rejection ReferenceError: err is not defined at . (/Users/clint/code/github/megaboilerplate-app/controllers/user.js:265:16) at tryCatcher (/Users/clint/code/github/megaboilerplate-app/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/Users/clint/code/github/megaboilerplate-app/node_modules/bluebird/js/main/promise.js:510:31) at Promise._settlePromiseAt (/Users/clint/code/github/megaboilerplate-app/node_modules/bluebird/js/main/promise.js:584:18) at Async._drainQueue (/Users/clint/code/github/megaboilerplate-app/node_modules/bluebird/js/main/async.js:128:12) at Async._drainQueues (/Users/clint/code/github/megaboilerplate-app/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues (/Users/clint/code/github/megaboilerplate-app/node_modules/bluebird/js/main/async.js:15:14) at runCallback (timers.js:637:20) at tryOnImmediate (timers.js:610:5) at processImmediate [as _immediateCallback] (timers.js:582:5)

My config is:

Configuration

I've got everything else working so far. LOVE this template by the way 👍

clintmod commented 7 years ago

ok figured it out: at controllers/user.js:265:16 I changed: done(err, user.toJSON()); to: done(null, user.toJSON()); and it works now