[No QA] Report caught render errors to Sentry from the web ErrorBoundary#91405
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Adds Sentry reporting for render errors caught by the web ErrorBoundary, aligning it with the native implementation so these handled render failures become visible in Sentry (in addition to the existing Log.alert).
Changes:
- Import Sentry in
src/components/ErrorBoundary/index.tsx. - In the web
logErrorhandler, add a Sentry breadcrumb witherrorInfoand callSentry.captureException(...).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
mountiny
left a comment
There was a problem hiding this comment.
Thank you, I will merge this so we can get this to staging sooner than later
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.81-0 🚀
|
|
No help site changes are required. This PR adds Sentry error reporting to the web |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.81-2 🚀
|
Explanation of Change
The web variant of
ErrorBoundary(src/components/ErrorBoundary/index.tsx) previously only calledLog.alert(...)when a render error was caught — it never reported to Sentry. The native variant (index.native.tsx) already does the right thing: it adds anerrorInfobreadcrumb and callsSentry.captureException.This PR mirrors those two Sentry calls into the web variant so that render errors caught by the web
ErrorBoundary(e.g. React error #185 "Maximum update depth exceeded") are visible in Sentry. The change is additive — the existingLog.alertcall is untouched. No behaviour changes on native;.native.tsxis unaffected.Fixed Issues
$ #91407
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
No QA is needed
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari