Bluebird — a promise was created in a handler but was not returned from it Bluebird — a promise was created in a handler but was not returned from it mongoose mongoose

Bluebird — a promise was created in a handler but was not returned from it


The problem is pretty much using a next callback at all, which calls functions that create promises without returning them. Ideally the hooks just needed to return promises instead of taking callbacks.

You should be able to prevent the warning by using

.then(function(result) {    next(null, result);    return null;}, function(error) {    next(error);    return null;});