KSDaemon/sails-hook-sequelize

Warning on Model.save

daaru00 opened this issue · 2 comments

When I use Model.save() I receive this warning message:

Warning: a promise was created in a  handler but was not returned from it
    at Instance.save (/projectpath/node_modules/sails-hook-sequelize/node_modules/sequelize/lib/instance.js:554:18)
    at Model.create (/projectpath/node_modules/sails-hook-sequelize/node_modules/sequelize/lib/model.js:1798:6)
    at /projectpath/api/models/Session.js:27:29
    at module.exports.options.classMethods.generate (/projectpath/api/models/Session.js:25:24)
    at null.<anonymous> (/projectpath/api/controllers/AuthController.js:15:33)
    at null.<anonymous> (/projectpath/node_modules/sails-hook-sequelize/node_modules/continuation-local-storage/context.js:74:17)
    at Immediate._onImmediate (/projectpath/node_modules/sails-hook-sequelize/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31)
    at processImmediate [as _immediateCallback] (timers.js:367:17)
From previous event:
    at Promise.then (/projectpath/node_modules/sails-hook-sequelize/node_modules/sequelize/lib/promise.js:21:17)
    at Object.module.exports.login (/projectpath/api/controllers/AuthController.js:10:62)
    at bound (/usr/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
    at routeTargetFnWrapper (/usr/lib/node_modules/sails/lib/router/bind.js:179:5)
    at callbacks (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:164:37)
    at param (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:138:11)
    at param (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:135:11)
    at pass (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:145:5)
    at nextRoute (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:100:7)
    at callbacks (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:167:11)
    at /usr/lib/node_modules/sails/lib/router/bind.js:187:7
    at alwaysAllow (/usr/lib/node_modules/sails/lib/hooks/policies/index.js:207:11)
    at routeTargetFnWrapper (/usr/lib/node_modules/sails/lib/router/bind.js:179:5)
    at callbacks (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:164:37)
    at param (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:138:11)
    at param (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:135:11)
    at pass (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:145:5)
    at nextRoute (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:100:7)
    at callbacks (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:167:11)
    at /usr/lib/node_modules/sails/lib/router/bind.js:187:7
    at _sendHeaders (/usr/lib/node_modules/sails/lib/hooks/cors/index.js:195:7)
    at routeTargetFnWrapper (/usr/lib/node_modules/sails/lib/router/bind.js:179:5)
    at callbacks (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:164:37)
    at param (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:138:11)
    at pass (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:145:5)
    at nextRoute (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:100:7)
    at callbacks (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:167:11)
    at /usr/lib/node_modules/sails/lib/router/bind.js:187:7
    at sails.router.bind._middlewareType (/usr/lib/node_modules/sails/lib/hooks/csrf/index.js:114:11)
    at routeTargetFnWrapper (/usr/lib/node_modules/sails/lib/router/bind.js:179:5)
    at callbacks (/usr/lib/node_modules/sails/node_modules/express/lib/router/index.js:164:37)

Is possible to suppress this warning?

export BLUEBIRD_WARNINGS=0

Hi @daaru00! @luislobo had given answer. So, closing for now. Feel free to reopen if you face any problems