Skip to content

Misleading unhandled rejection warning when using when.settle #493

@rooftopsparrow

Description

@rooftopsparrow

Hello!

I'm wondering if this is expected behavior?

// node repl with latest when
> when = require('when')
> when.settle([ Promise.reject('help'), Promise.resolve('yesss') ])
{ state: 'pending' }
> Potentially unhandled rejection [1] help (WARNING: non-Error used)
> when.settle([ when.reject('help'), when.resolve('yesss') ])
{ state: 'pending' }

Notice that we get a warning when using global Promises but we do not get that warning with when promises. It has caused some painful debugging to find that it wasn't actually unhandled.

Thanks for your time and library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions