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

feat(error-overlay): collect errors from console.error #293

Merged
merged 7 commits into from
Apr 13, 2024

Conversation

hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Apr 13, 2024

Since some "errors" only show on in console.error, so they won't be automatically processed by vitePluginErrorOverlay.

Either we need to do:

  • re-throw some errors inside react-server so it'll trigger unhandled error event.
  • extend vitePluginErrorOverlay to be able to receive custom error from react-server
  • extend vitePluginErrorOverlay to handle console.error log by patching
    • ✔️ this seems robust enough and nicely covers react use cases out-of-the-box without changing anything on react-server integration.

It doesn't look like hydrateRoot.onRecoverableError tells about the error either.

@hi-ogawa hi-ogawa changed the title feat(react-server): error overlay feat(error-overlay): collect errors from console.error Apr 13, 2024
@hi-ogawa hi-ogawa marked this pull request as ready for review April 13, 2024 06:40
@hi-ogawa hi-ogawa merged commit 58cef03 into main Apr 13, 2024
4 checks passed
@hi-ogawa hi-ogawa deleted the feat-react-server-error-overlay branch April 13, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant