question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled rejection from `.map()` and `.filter()` in v3.5.1

See original GitHub issue

Please answer the questions the best you can:

  1. What version of bluebird is the issue happening on?

3.5.1

  1. What platform and version? (For example Node.js 0.12 or Google Chrome 32)

Node 6.12.2, Mac OS 10.12.6

  1. 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:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
avirancocommented, Jun 17, 2018

I’ve experienced this issue as well. What is the status of this issue? the fix is planned to be merged soon?

0reactions
overlookmotelcommented, Dec 20, 2017

Please see PR #1489 which fixes this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found