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

[Flight] Improve Error Messages when Invalid Object is Passed to Client/Host Components #25492

Merged
merged 5 commits into from
Oct 17, 2022

Commits on Oct 17, 2022

  1. Print built-in specific error message for toJSON

    This is a better message for Date.
    
    Also, format the message to highlight the affected prop.
    sebmarkbage committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    ea3f0b5 View commit details
    Browse the repository at this point in the history
  2. Describe error messages using JSX elements in DEV

    We don't have access to the grand parent objects on the stack so we stash
    them on weakmaps so we can access them while printing error messages.
    
    Might be a bit slow.
    sebmarkbage committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    31cfca1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    41f86e3 View commit details
    Browse the repository at this point in the history
  4. Special case errror messages for children of host components

    These are likely meant to be text content if they're not a supported object.
    sebmarkbage committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    a94c21b View commit details
    Browse the repository at this point in the history
  5. Update error messages

    sebmarkbage committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    e6838fc View commit details
    Browse the repository at this point in the history