findAll promise warning
See original GitHub issueWhat are you doing?
module.exports = {
async getSeries(req, res) {
const limit = req.swagger.params.limit.value || 5;
const offset = req.swagger.params.offset.value || 0;
const allSeries = await series
.findAll({
limit,
offset,
});
res.json(allSeries);
},
};
The query works, there are no errors.
What do you expect to happen?
No warnings.
What is actually happening?
Warning:
(node:21938) Warning: a promise was created in a handler at domain.js:126:23 but was not returned from it, see http://goo.gl/rRqMUw
at Function.Promise.cast (/a/project/node_modules/bluebird/js/release/promise.js:196:13)
Output, either JSON or SQL
Everything works. Just want to get rid of the warning.
Dialect: mysql Dialect version: idk Database version: 8 Sequelize version: 4.42.0 Tested with latest release: No
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Promise warning after a mysql query - Stack Overflow
Doesn't matter. User.findAll returns a promise, which is not returned. That's where the error comes from. – Ludovic C. Dec 23, 2015 at...
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 >Say Something - Sandy Hook Promise
Sandy Hook Promise's no-cost Say Something program teaches middle and high school students to recognize the warning signs of someone at-risk of hurting ......
Read more >triggeruncaughtexception promise - You.com | The AI Search ...
On running the AzureStaticWebApp recently there was node and npm upgradation which caused a promise error i.e triggerUncaughtException as shown below in ...
Read more >SQL (Sequelize) | NestJS - A progressive Node.js framework
Warning In this article, you'll learn how to create a DatabaseModule based on the ... typeof Cat ) {} async findAll(): Promise<Cat[]> {...
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
Hi @papb Sorry for late response, i was struggling with the warning to come up into the terminal. Setting the
NODE_ENV=development
was the missing link.Demonstrating the warning can be found here. I added it as a pull-request. I only configured the
NODE_ENV
for the travis ci, so for now you can see the warnings here.I didn’t added the
NODE_ENV
thats why appvoyer ci, that is why log did not shows the warning.I’m also getting this warning while running in
NODE_ENV=development
mode.Bluebird doc confirms that setting the
NODE_ENV=development
mode, enablesBLUEBIRD_WARNINGS
Yes, I also find this warning occured when i set NODE_ENV=development with version 5.21.5 It
s bluebird
s problem.