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

fix: use globalThis.Error in case there is a proto Error message #997

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

lukealvoeiro
Copy link
Collaborator

@lukealvoeiro lukealvoeiro commented Feb 7, 2024

Description

handleError receives and returns an instance of Error. However, if there is a proto message named Error that is declared or imported into this file, then we run into a Typescript problem. This PR forces the handleError function to always expect globalThis.Error instead.

TODO:

  • Handle case where globalThisPolyfill is set to true

@lukealvoeiro lukealvoeiro changed the title fix: use globalThis.Error in case there is a proto Error message fix: use globalThis.Error in case there is a proto Error message Feb 7, 2024
@stephenh stephenh merged commit 061eaf8 into stephenh:main Feb 8, 2024
8 checks passed
@stephenh
Copy link
Owner

stephenh commented Feb 8, 2024

Looks great, thank you!

@stephenh
Copy link
Owner

🎉 This PR is included in version 1.167.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants