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

fallbackError loses custom error types #1511

Open
1 task done
aecorredor opened this issue Apr 2, 2023 · 0 comments
Open
1 task done

fallbackError loses custom error types #1511

aecorredor opened this issue Apr 2, 2023 · 0 comments

Comments

@aecorredor
Copy link

Bug report

  • I have checked other issues to make sure this is not a duplicate.

Describe the bug

When using fallbackError as described in the docs for checking custom error classes (extended from Error) something weird seems to happen where the custom class prototype is lost and instance of CustomError always returns false within fallbackError. I checked instance of CustomError within the actual resolver before throwing, and it does return true as expect. So, it's not a TS or ESBuild compilation issue.

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