Sequelize : Warning: a promise was created in a handler but was not returned from it
See original GitHub issue(This issue tracker is only for bug reports or feature requests, if this is neither, please choose appropriate channel from http://bluebirdjs.com/docs/support.html)
Please answer the questions the best you can:
-
What version of bluebird is the issue happening on? 3.5.1
-
What platform and version? (For example Node.js 0.12 or Google Chrome 32) Node.js 9.8.0
-
Did this issue happen with earlier version of bluebird? 3.5.0: yes
(Write description of your issue here, stack traces from errors and code that reproduces the issue are helpful)
I am either deleting or saving model instances through sequelize, eg
User.destroy({ where: { id: id } })
.then(() => {})
var user = new User({...})
user.save()
.then(() => {})
and everytime I get the warning. I’ve tried adding return null
in the then
clause but that does absolutely nothing.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Getting: "Warning: a promise was created in a handler but was ...
Issue Description I have a nodejs server as a REST API with various routes and i am using sequelize to access and manage...
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 >Why do I not get the warning "a promise was created in a ...
I observed some cases where I'm getting following warning: Warning: a promise was created in a handler but was not returned from it....
Read more >Warning: A Promise Was Created In A Handler At But Was Not ...
Warning: a promise was created in a handler but was not returned from it This usually means that you simply forgot a return...
Read more >a promise was created in a handler at but was not returned ...
Coding example for the question Warning: a promise was created in a handler at but was not returned from it [bluebird]-node.js.
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 Free
Top 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
@opichon I’m seeing a similar problem (with Sequelize v3.30.4 - we’re not currently in a position to upgrade). Did you raise a ticket with them, or find a fix for the Bluebird warning?
Do you have the code from:
/Users/olivier/projects/kinkao/api/auth/auth.js:19:16
And
/Users/olivier/projects/kk/api/auth/oauth.js:34:21
?
Look at those lines in those files