Q, a popular implementation of promises, sometimes gives the following warning:
[Q] Unhandled rejection reasons (should be empty) ...
Some examples of code that produce the warning are given in the related issue reports:
- Misleading warning about unhandled failure
- Handled rejected promises are claimed as unhandled in some cases
- Promise dispatch methods cause duplicate unhandled rejections
- Unhandled rejected promise with q.delay
- Implicitly handle rejections that resolve an already-resolved promise
- Unhandled rejection reason (chai-as-promised)
Current workaround is an API for handling possibly unhandled errors which also contains method to disable tracking:
In branch for Q version 1.x (current stable version is 0.9) there is a commit that rips out the reporting code. This would also remove these misleading warning messages.