fix: unhandled exception tag and fatal tag overwrite in CrashReporter #217
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Bug fix:] Fix unhandled exception tag and fatal tag overwrite in CrashReporter
Description π
CrashReporter.processUnhandledErrortags unhandled errors withUnhandledErrorinstead ofUnhandledException, which prevents the Raygun web app's "Unhandled exception" filter from matching React Native crash reports. Additionally, whenisFatalistrue, theFataltag overwrites the unhandled tag instead of being additive, so fatal crashes lose the unhandled tag entirely.UnhandledErrortoUnhandledExceptionto align with all other Raygun providers. Changed the fatal tag logic to pushFatalonto the existing tags array rather than replacing it, so fatal crashes are tagged with bothUnhandledExceptionandFatal.Type of change
Updates
π Changed
UnhandledErrortag toUnhandledExceptioninsdk/src/CrashReporter.tsπ Made
Fataltag additive instead of overwriting the unhandled tagπ Added two regression tests covering both non-fatal and fatal unhandled error tagging
Screenshots π·
N/A β backend tagging change, no UI impact.
Test plan π§ͺ
cd sdk && npx jest --no-coverageshould tag unhandled errors with UnhandledExceptionβ confirms theUnhandledExceptiontag is present andUnhandledErroris not.should tag fatal unhandled errors with both UnhandledException and Fatalβ confirms both tags are present additively.RaygunClientwithenableCrashReporting: truesetTimeout(() => { throw new Error('test'); }, 0))UnhandledExceptionUnhandledExceptionandFataltagsAuthor to check π
Reviewer to check βοΈ