-
Notifications
You must be signed in to change notification settings - Fork 49.9k
[Fiber] Don't Rethrow Errors at the Root #28627
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
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
517e197
Report DOM events to reportError directly instead of rethrowing
sebmarkbage bec21b2
Never rethrow at the root
sebmarkbage 742aba4
Log fatal errors as they happen
sebmarkbage 54471d4
Report root errors to the browser so they show up as "uncaught"
sebmarkbage bc5374d
Polyfill dispatching error event
sebmarkbage c6dd65e
Remove rethrowing in the commit phase
sebmarkbage 0d7615d
Rethrow global errors that happened during an internal act
sebmarkbage ef549d4
Rethrow uncaught errors from act instead of logging them
sebmarkbage 9f8a43a
Aggregate errors in internal act
sebmarkbage 8fe758b
Aggregate errors in act
sebmarkbage 254af8d
Use shared queue and only track errors once for internalAct/waitFor
sebmarkbage b4de7d2
Test error logging recovery without act
sebmarkbage 06e4464
Fix tests that failed due to internalAct now rethrowing non-render er…
sebmarkbage 785c32a
Fix tests
sebmarkbage e32089f
Fix tests that rely on flushSync to throw
sebmarkbage 175484e
Use internal act for prod testing
sebmarkbage 7344587
Build lint process for the reportGlobalError polyfill
sebmarkbage 613ae34
Fix test
sebmarkbage d3f0b57
Fix legacy tests
rickhanlonii c06e47d
Fix legacy tests in ReactDOM-test.js
rickhanlonii 45fb81e
Add back React.Children.only
rickhanlonii 8e3c0ae
Fix useSyncExternalStoreShared-test.js
rickhanlonii 7a07e98
Fix ReactFresh-test.js
rickhanlonii 0928d91
Update error messages
sebmarkbage File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix tests
- Loading branch information
commit 785c32a693fc85b610ce8ffde0f231c0b99d8484
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Should we assert somewhere that this was thrown to reportError or whatever?
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.
So it's a bit weird about what we should be testing here. Because this is to test that something works even if aggregated errors is not supported by the platform. However, we only do aggregation at all in
act()now. So we're testingact()and if you useactin an environment that doesn't support aggregated errors, then this does get dropped. Not logged somewhere else.Which I guess is mostly if you use act in a non-JSDOM environment.
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.
Makes sense, we should probably update the comment on 143 then