Skip to content

fix(angular): Guard ErrorEvent check in ErrorHandler to avoid throwing in Node environments #12892

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

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 12, 2024

Small fix for a "bug" mentioned in #12757 (comment)

This PR adds a guard for referencing ErrorEvent which is only available in browser environments but not in Node. Now, the errorHandler, as well as @sentry/angular in general is only expected to be run in browser environments. So this fix is technically not necessary at the moment but people nevertheless use @sentry/angular in Node environments so let's make their lives a bit easier.

@Lms24 Lms24 requested review from a team, AbhiPrasad and chargome and removed request for a team July 12, 2024 08:20
@Lms24 Lms24 enabled auto-merge (squash) July 12, 2024 09:18
@Lms24 Lms24 merged commit 9f07f99 into develop Jul 12, 2024
90 checks passed
@Lms24 Lms24 deleted the lms/fix-angular-errorEvent-in-node-guard branch July 12, 2024 09:22
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

Successfully merging this pull request may close these issues.

2 participants