Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly a bug in OperationError wrapping #1679

Open
charlag opened this issue May 6, 2021 · 0 comments
Open

Possibly a bug in OperationError wrapping #1679

charlag opened this issue May 6, 2021 · 0 comments

Comments

@charlag
Copy link

charlag commented May 6, 2021

(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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant