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

Added a null check to BugsnagErrorHandler #2295

Merged
merged 5 commits into from
Jan 28, 2025

Conversation

gingerbenw
Copy link
Member

@gingerbenw gingerbenw commented Jan 28, 2025

Goal

Improve experience when BugsnagErrorHandler is misconfigured

Design

.addOnError and .addOnSession currently fail loudly when BugsnagErrorHandler is constructed before starting Bugsnag. This PR adds a simple null check to prevent errors from being thrown.

Copy link

github-actions bot commented Jan 28, 2025

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 46.96 kB 14.02 kB
After 46.96 kB 14.02 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against fddcb4d

@gingerbenw gingerbenw changed the title fix: 🐛 fix issue with addOnSession reference when Bugsnag is not … Added a null check to BugsnagErrorHandler Jan 28, 2025
@gingerbenw gingerbenw marked this pull request as ready for review January 28, 2025 14:24
@gingerbenw
Copy link
Member Author

@tomlongridge happy with this one in principal before it goes in?

@gingerbenw gingerbenw merged commit 8bc743d into next Jan 28, 2025
59 checks passed
@gingerbenw gingerbenw deleted the gingerbenw/plugin-angular-configuration branch January 28, 2025 16:51
hannah-smartbear pushed a commit that referenced this pull request Jan 31, 2025
* fix: 🐛 fail quietly when client is null

* docs: 📝 update CHANGELOG.md
@yousif-bugsnag yousif-bugsnag mentioned this pull request Mar 4, 2025
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.

None yet

3 participants