Skip to content
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

Emit Server Error Prefix in the .stack Property Too #28738

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Apr 3, 2024

Follow up to #28684.

V8 includes the message in the stack and printed errors include just the stack property which is assumed to contain the message. Without this, the prefix doesn't get printed in the console.

Screenshot 2024-04-03 at 6 32 04 PM

A possible alternative would be to use a nested error with a cause like #28736 but that would need some more involved serializing since this prefix is coming from the server. Perhaps as a separate attribute.

@sebmarkbage sebmarkbage requested a review from gnoff April 3, 2024 22:15
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 3, 2024
@react-sizebot
Copy link

react-sizebot commented Apr 3, 2024

Comparing: 7a2609e...18bdc04

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 169.31 kB 169.31 kB = 52.76 kB 52.76 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 171.13 kB 171.13 kB = 53.33 kB 53.33 kB
facebook-www/ReactDOM-prod.classic.js = 589.03 kB 589.03 kB = 103.68 kB 103.68 kB
facebook-www/ReactDOM-prod.modern.js = 566.05 kB 566.05 kB = 99.59 kB 99.59 kB
test_utils/ReactAllWarnings.js Deleted 64.60 kB 0.00 kB Deleted 16.14 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 64.60 kB 0.00 kB Deleted 16.14 kB 0.00 kB

Generated by 🚫 dangerJS against 18bdc04

V8 includes the message in the stack and printed errors include just the
stack property which is assumed to contain the message.
@sebmarkbage sebmarkbage merged commit 583eb67 into facebook:main Apr 4, 2024
38 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 4, 2024
Follow up to #28684.

V8 includes the message in the stack and printed errors include just the
stack property which is assumed to contain the message. Without this,
the prefix doesn't get printed in the console.

<img width="578" alt="Screenshot 2024-04-03 at 6 32 04 PM"
src="https://github.com/facebook/react/assets/63648/d98a2db4-6ebc-4805-b669-59f449dfd21f">

A possible alternative would be to use a nested error with a `cause`
like #28736 but that would need some more involved serializing since
this prefix is coming from the server. Perhaps as a separate attribute.

DiffTrain build for [583eb67](583eb67)
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
Follow up to facebook#28684.

V8 includes the message in the stack and printed errors include just the
stack property which is assumed to contain the message. Without this,
the prefix doesn't get printed in the console.

<img width="578" alt="Screenshot 2024-04-03 at 6 32 04 PM"
src="https://github.com/facebook/react/assets/63648/d98a2db4-6ebc-4805-b669-59f449dfd21f">

A possible alternative would be to use a nested error with a `cause`
like facebook#28736 but that would need some more involved serializing since
this prefix is coming from the server. Perhaps as a separate attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants