Skip to content

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

@overlookmotel

Description

@overlookmotel

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 48c8591 but I can't understand why!

Don't know if this is related to #1468.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions