a promise was created in a handler but was not returned from it
See original GitHub issueHello,
I am trying to use Koa with MongooseJS.
here is the MongooseJS code
export function* update(next) {
this.response.body = yield Item
.findById(this.params.id).exec()
.then(item => {
const updated = _.merge(item, this.request.body);
return updated.save();
});
}
Seems like I’m missing something obvious but I don’t know what is it.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Bluebird warning "A promise was created in a handler but was ...
If it determines that a Promise was created at any point while your handler is running (that includes anywhere down in the callstack),...
Read more >A promise was created in a handler but was not returned from it.
This usually means that you simply forgot a return statement somewhere, which will cause a runaway promise that is not connected to any...
Read more >a promise was created in a handler but was not returned from it
If I run a simple Promise or any other Sequelize call (find, update, create) without the transaction it does not show this warning....
Read more >a promise was created in a handler at but was not returned ...
You created a promise here: Promise.all(CACHE.List .filter(shouldLoadFile) .map(file => Tutorials.get(file.id).then(content => { CACHE.
Read more >warning: a promise was created in a handler but was not returned ...
Bluebird is a fully featured JavaScript promises library with unmatched performance. bluebird npm. This is a playground to test code. It runs a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is new bluebird feature (mongoose is using it). http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-created-in-a-handler-but-none-were-returned-from-it It means that something is broken in mongoose. It shows up only when you use
then
and have BLUEBIRD_DEBUG=1 or NODE_ENV=development in your env.whoop!