Skip to content

Possibly a bug in OperationError wrapping #1679

Open
@charlag

Description

@charlag

(This issue tracker is only for bug reports or feature requests, if this is neither, please choose appropriate channel from http://bluebirdjs.com/docs/support.html)

Please answer the questions the best you can:

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

  2. What platform and version? (For example Node.js 0.12 or Google Chrome 32)
    any, e.g. Chrome 92

  3. Did this issue happen with earlier version of bluebird?
    Unsure

Looking at the code for Bluebird we stumbled upon this function which is used to decide on OperationError wrapping:

function isUntypedError(obj) {
return obj instanceof Error &&
es5.getPrototypeOf(obj) === Error.prototype;
}

This looks like the function should be reverted if we assume that "untyped error" is everything that doesn't inherit from Error. Documentation is not clear about that.

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