othiym23 / node-continuation-local-storage

implementation of https://github.com/joyent/node/issues/5243
BSD 2-Clause "Simplified" License
1.13k stars 207 forks source link

Warning: a promise was created in a handler but was not returned from it. #110

Closed nmtuan200793 closed 7 years ago

nmtuan200793 commented 7 years ago

I'm using this package with Bluebird promise. It works fine, but I get the following warning: (Node: 13324) Warning: a promise was created in a handler, but was not returned from it, see http://goo.gl/rRqMUw. Could have a way to resolve or ignore it?

Thanks,

loyaltymethods commented 7 years ago

Ignore is simple - just set BLUEBIRD_WARNINGS=0 env variable. There are other ways described here:

http://bluebirdjs.com/docs/api/promise.config.html

This is particularly annoying if you are using something like Mongoose, and you choose to use Bluebird for the promise library, but you are using callbacks for some of your Mongoose operations that also return a promise.

nmtuan200793 commented 7 years ago

Yep, it works for me. Thank you.