title: Unknown error when using bcrypt.hash
body: <p>I have this <code>pre</code> mongoose middleware for saving passwords,I previously used synchronous implementation,now I am doing an asynchronous implemntation as mongoose middleware:</p>
  
  <pre><code>schema.pre('save', function(next) {
    var user = this;
    var SALT_WORK_FACTOR = 5;
  
    if (!user.isModified('local.password')) return next();
  
    bcrypt.genSalt(SALT_WORK_FACTOR, function(err, salt) {
      if (err) return next(err);
  
      bcrypt.hash(user.local.password, salt, function(err, hash) {
          if (err) return next(err);
          user.local.password = hash;
          next();
      });
    });
  });
  </code></pre>
  
  <p>The code just throws an unknown error when it gets to <code>bcrypt.hash</code> although the error is previously <code>null</code>. If I use something like <code>stackup</code>,the error looks like this:</p>
  
  <pre><code>E:\Do\login\node_modules\stackup\index.js:32
        error.stack = activeTrace.toString(error.stack);
                    ^
  TypeError: Cannot assign to read only property 'stack' of No callback function w
  as given.
      at AsyncListener.error (E:\Do\login\node_modules\stackup\index.js:32:19)
      at asyncCatcher (E:\Do\login\node_modules\stackup\node_modules\async-listene
  r\glue.js:123:26)
      at process._asyncFatalException [as _fatalException] (E:\Do\login\node_modul
  es\stackup\node_modules\async-listener\glue.js:211:14)
  </code></pre>