Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluebird promises log unhandled rejection errors #31

Closed
pluma opened this issue May 5, 2015 · 4 comments
Closed

Bluebird promises log unhandled rejection errors #31

pluma opened this issue May 5, 2015 · 4 comments
Assignees
Labels
Bug A code defect that needs to be fixed.

Comments

@pluma
Copy link
Contributor

pluma commented May 5, 2015

Bluebird is being "helpful" by logging rejected promises that don't have rejection handlers.

This leads to console noise when promises are silently discarded in favour of callbacks (e.g. when db.collection or db.edgeCollection with autoCreate=true determines that a collection doesn't exist).

This problem only occurs when bluebird is used as a promise polyfill via global.Promise = require('bluebird').

@xescugc xescugc mentioned this issue May 5, 2015
@pluma pluma added the Bug A code defect that needs to be fixed. label May 5, 2015
@pluma pluma self-assigned this May 5, 2015
@pluma pluma closed this as completed in fbd9f92 May 5, 2015
@pluma
Copy link
Contributor Author

pluma commented May 5, 2015

@xescugc Can you test with the current development version again? I've implemented a workaround that should make sure bluebird only complains if you didn't pass a callback and don't use a rejection handler.

@xescugc
Copy link
Contributor

xescugc commented May 5, 2015

Ok i've tested it including the global.Promise and removing the collections, and it worked 😄 , i'll migrate everithing to promises this night but i think the bug is solved.

@xescugc
Copy link
Contributor

xescugc commented May 6, 2015

Tested with full Promises and works 👍

@pluma
Copy link
Contributor Author

pluma commented May 6, 2015

The fixes are in 3.6.0 on npm. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A code defect that needs to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants