-
Notifications
You must be signed in to change notification settings - Fork 211
feat: Adds suppressible flag for error boundaries #4211
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
Conversation
555685f to
f6c3400
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4211 +/- ##
==========================================
+ Coverage 97.16% 97.17% +0.01%
==========================================
Files 879 882 +3
Lines 25780 25826 +46
Branches 9328 9332 +4
==========================================
+ Hits 25049 25097 +48
+ Misses 725 723 -2
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/error-boundary/interfaces.ts
Outdated
| * When `suppressNested` is set to `true`, nested built-in or standalone | ||
| * boundaries are disabled. In this mode, all errors originating from within | ||
| * the boundary’s content are captured exclusively by this boundary. | ||
| * When `suppressNested` is set to `true`, nested built-in error boundaries, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: I'd suppress the comma after the first line, and replace "or" with "and" in the second one, since this will affect both built-in error boundaries and nested standalone error boundaries, not one or the other:
When
suppressNestedis set totrue, nested built-in error boundaries and nested standalone error boundaries withsuppressible=trueare disabled, so the errors propagate further up and are captured by this error boundary.
Description
Introduces
suppressibleflag to error boundaries. Now, when a boundary is used withsuppressNested=true, only suppressible standalone error boundaries will get disabled.See: [kmVcAbjoeQB4]
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.