Unhandled rejection from `.map()` and `.filter()` in v3.5.1
See original GitHub issuePlease 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 6.12.2, Mac OS 10.12.6
- Did this issue happen with earlier version of bluebird?
No. Issue not present in bluebird 3.5.0.
Chaining .map()
or .filter()
on to a rejected promise leads to an unhandled rejection, even when .catch()
handler is attached further down the chain.
Promise.reject( new Error('foo') )
.map( () => {} )
.catch( () => {} );
With bluebird v3.5.1, the above produces Unhandled rejection Error: foo
. In v3.5.0 no unhandled rejection is created.
I assume is caused by https://github.com/petkaantonov/bluebird/commit/48c8591c0ad3fc6a8f6dc38956fe6a08dd0b617f but I can’t understand why!
Don’t know if this is related to https://github.com/petkaantonov/bluebird/issues/1468.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Unhandled Rejection (TypeError): zone.filter is not a function
Your mistake is that your fetch result is an object ( .json() returns javascript object) while filter is an array method.
Read more >Changelog - Cypress Documentation
Fixed an issue with Angular Component Testing where a custom sourceRoot configuration would not be respected. Fixes #24827. Fixed Typescript typings for cy....
Read more >Unreal Engine 5.1 Release Notes
Overview of new and updated features in Unreal Engine 5.1. ... The FAnimNotifyEvent::IsBlueprintNotify() now supports metadata filtering using the ...
Read more >Documentation - Ethers.js
Returns a best guess of the Gas Price to use in a transaction. // The gas price (in wei)... gasPrice = await provider.getGasPrice()...
Read more >keywords:unhandledRejection - npm search
Crash or abort if you get an unhandledRejection or multipleResolves ... Emit unhandledRejection when a Promise rejection is concealed by Promise.race().
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
I’ve experienced this issue as well. What is the status of this issue? the fix is planned to be merged soon?
Please see PR #1489 which fixes this.