Add error boundaries and exception tracking to the website
Part 1: Gracefully handle exceptions
If an error occurs, we should show some kind of fallback UI.
We already handle specific types of errors like failing to load Babel or Algolia libs from CDN, but a more general-purpose error boundary would be nice to handle other unexpected errors.
Part 2: Track exceptions
We should also log/track errors as well. Maybe we could use GA's exception tracking for this?
This issue can also potentially help with #14
Hey @bvaughn , wanted to work on this. Looks like issue #3 , #14 , https://github.com/facebook/react/issues/11008 can be solved by applying error boundaries around CodEditor, Header and Layout component where we just nudge people to whitelist the site in adblockers (As these are happening due to Fair Adblocker) . What are your thoughts?
Agreed that error boundaries could probably help with a couple of issues! Please feel free to take this! 😄
I've added an "in-progress" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim.
Cheers!
It looks like the remaining TODO here (the search box) isn't being actively worked on so I'm removing the in-progress label.
Hey @bvaughn I think #186 is closing this now.
We've added specific error-handling for failed docsearch and Babel loads, but this issue still remains open to add at least one general purpose error boundary around the site in case of other, unexpected errors.
..
Is this issue open? Can you assign it to me if it is?
Hi @bvaughn, I'd like to work on this issue if it's still available. I've already forked the repo, set up the project locally, and started implementing the ErrorBoundary. Let me know if I can proceed — I'd be happy to open a PR soon.
This issue is no longer relevant on the new react.dev site I believe because error boundaries and tracking are built in I believe.