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

[Fizz] Send errors down to client #24551

Merged
merged 7 commits into from
May 30, 2022

Commits on May 30, 2022

  1. use return from onError

    salazarm authored and gnoff committed May 30, 2022
    Configuration menu
    Copy the full SHA
    1fe9dc6 View commit details
    Browse the repository at this point in the history
  2. export getSuspenseInstanceFallbackError

    salazarm authored and gnoff committed May 30, 2022
    Configuration menu
    Copy the full SHA
    e3d5da4 View commit details
    Browse the repository at this point in the history
  3. stringToChunk

    salazarm authored and gnoff committed May 30, 2022
    Configuration menu
    Copy the full SHA
    9b64ed2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    840f72d View commit details
    Browse the repository at this point in the history
  5. 1 more type

    salazarm authored and gnoff committed May 30, 2022
    Configuration menu
    Copy the full SHA
    9f0647a View commit details
    Browse the repository at this point in the history
  6. support encoding errors in html stream and escape user input

    This commit adds another way to get errors to the suspense instance by encoding them as dataset properties of a template element at the head of the boundary. Previously if there was an error before the boundary flushed there was no way to stream the error to the client because there would never be a client render instruction.
    
    Additionally the error is sent in 3 parts
    
    1) error hash - this is always sent (dev or prod) if one is provided
    2) error message - Dev only
    3) error component stack - Dev only, this now captures the stack at the point of error
    
    Another item addressed in this commit is the escaping of potentially unsafe data. all error components are escaped as test for browers when written into the html and as javascript strings when written into a client render instruction.
    gnoff committed May 30, 2022
    Configuration menu
    Copy the full SHA
    3fc4439 View commit details
    Browse the repository at this point in the history
  7. nits

    gnoff committed May 30, 2022
    Configuration menu
    Copy the full SHA
    c026c26 View commit details
    Browse the repository at this point in the history