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

support errorInfo in onRecoverableError #24591

Merged
merged 9 commits into from Jun 6, 2022

Commits on Jun 6, 2022

  1. extend onRecoverableError API to support errorInfo

    errorInfo has been used in Error Boundaries wiht componentDidCatch for a while now. To date this metadata only contained a componentStack. onRecoverableError only receives an error (type mixed) argument and thus providing additional error metadata was not possible without mutating user created mixed objects.
    
    This change modifies rootConcurrentErrors rootRecoverableErrors, and hydrationErrors so all expect CapturedValue types. additionally a new factory function allows the creation of CapturedValues from a value plus a hash and stack.
    
    In general, client derived CapturedValues will be created using the original function which derives a componentStack from a fiber and server originated CapturedValues will be created using with a passed in hash and optional componentStack.
    gnoff committed Jun 6, 2022
    Copy the full SHA
    6cd4884 View commit details
    Browse the repository at this point in the history
  2. refactor hash to digest

    gnoff committed Jun 6, 2022
    Copy the full SHA
    8d3c13f View commit details
    Browse the repository at this point in the history
  3. only send hash if present

    gnoff committed Jun 6, 2022
    Copy the full SHA
    ad431e9 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    7f69424 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    8b596cd View commit details
    Browse the repository at this point in the history
  6. fix type

    gnoff committed Jun 6, 2022
    Copy the full SHA
    8ec1094 View commit details
    Browse the repository at this point in the history
  7. test gymnastics

    gnoff committed Jun 6, 2022
    Copy the full SHA
    393ca1f View commit details
    Browse the repository at this point in the history
  8. switch to __WWW__ gating

    gnoff committed Jun 6, 2022
    Copy the full SHA
    b0837f6 View commit details
    Browse the repository at this point in the history
  9. use both...

    gnoff committed Jun 6, 2022
    Copy the full SHA
    3b86e0f View commit details
    Browse the repository at this point in the history