react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

Add error boundaries and exception tracking to the website

Open bvaughn opened this issue 8 years ago • 9 comments

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?

bvaughn avatar Oct 06 '17 17:10 bvaughn

This issue can also potentially help with #14

bvaughn avatar Oct 06 '17 18:10 bvaughn

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?

ishankbahl avatar Oct 08 '17 15:10 ishankbahl

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!

bvaughn avatar Oct 08 '17 17:10 bvaughn

It looks like the remaining TODO here (the search box) isn't being actively worked on so I'm removing the in-progress label.

bvaughn avatar Oct 18 '17 17:10 bvaughn

Hey @bvaughn I think #186 is closing this now.

SadPandaBear avatar Oct 20 '17 18:10 SadPandaBear

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.

bvaughn avatar Oct 20 '17 19:10 bvaughn

..

naveen1249 avatar Jan 23 '22 23:01 naveen1249

Is this issue open? Can you assign it to me if it is?

spiritanand avatar Jan 29 '23 10:01 spiritanand

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.

iamdivyanshgautam avatar Jun 25 '25 08:06 iamdivyanshgautam

This issue is no longer relevant on the new react.dev site I believe because error boundaries and tracking are built in I believe.

rickhanlonii avatar Jun 28 '25 20:06 rickhanlonii