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.
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
feat: add error boundaries #14211
feat: add error boundaries #14211
Changes from 10 commits
007d5f3
f683ce2
51e49be
11b2ecd
10897ac
e6b6a68
dc95bd3
b9bc80d
cf11f58
4d8ad24
2c8dea6
5be2334
c468c6d
3ae0c80
3441004
75a01a5
371f118
36dcb7d
3afd1bb
1564640
acb3cd0
bc72ed2
a77bf50
f82a59b
6aa714e
b53cfc8
1ec18a3
a7ee520
3070f67
fbbb7d9
3322856
08b82f9
2d27f50
702adf9
69877ae
8e74719
b4a30a4
a81dc34
0fe5274
62e1af8
dfdcf02
b3d1d92
dc36557
2b0778e
93b16b1
4509d3b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What do you think about adding a
onreset
prop here as well? There are some scenarios where executing a side effect could be useful.I know users can reach in and wrap the
reset
method, but that feels like it introduces friction.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.
We already provide component stack traces on our errors during DEV, this PR actually extends this so the stack happens in more places too.
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.
Awesome, I didn't realize we had the component stack on
error.message
, seems like it was implemented earlier! That's great, any error logging sdk can parse that and use right away.Right now this component stack is attached to an error with
define_property(error, 'message'...
inhandle_error
. Could we evaluate defining it as a separate field on the error? This would make it easier for error logging to just grab and parse the field instead of having to read througherror.message
. It would also be nice to pass thecomponent_stack
intoonerror
callback so it can be used in userland (users don't have to parseerror.message
to get access to it).