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

ApolloError class missing name property #9322

Closed
aaronadamsCA opened this issue Jan 18, 2022 · 0 comments · Fixed by #9323
Closed

ApolloError class missing name property #9322

aaronadamsCA opened this issue Jan 18, 2022 · 0 comments · Fixed by #9323

Comments

@aaronadamsCA
Copy link
Contributor

ApolloError extends Error, but it doesn't have this.name = 'ApolloError', meaning ApolloError objects don't have a name property.

This breaks TypeScript type safety, since Error has a non-optional property name: string. It's also causing Sentry to complain Non-Error exception captured every time it receives an ApolloError object, because it's missing its name, which is what led me to report this.

aaronadamsCA added a commit to aaronadamsCA/apollo-client that referenced this issue Jan 18, 2022
brainkim pushed a commit to aaronadamsCA/apollo-client that referenced this issue Jan 20, 2022
jerelmiller pushed a commit to aaronadamsCA/apollo-client that referenced this issue Nov 18, 2022
jerelmiller added a commit that referenced this issue Nov 18, 2022
* Add name property to ApolloError

Fixes #9322

* update error snapshots

* Add CHANGELOG entry for #9323

Co-authored-by: Brian Kim <briankimpossible@gmail.com>
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant