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

ref(js): Add note about react error boundary and CaptureConsole #7592

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

AbhiPrasad
Copy link
Member

ref getsentry/sentry-javascript#8689

Add note about interaction between react error boundary and the CaptureConsole integration. This is duplicated, once in the react docs and once in the CaptureConsole docs so that it can be discovered easily.

@AbhiPrasad AbhiPrasad requested a review from a team August 3, 2023 00:19
@vercel
Copy link

vercel bot commented Aug 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 3, 2023 11:27pm

<Alert level="warning" title="Note">

By default React [logs all errors to the console](https://github.com/facebook/react/blob/493f72b0a7111b601c16b8ad8bc2649d82c184a0/packages/react-reconciler/src/ReactFiberErrorLogger.js#L85), even if you are using an React error boundary. This means that Sentry will capture the error through the `CaptureConsole` integration and not through the error boundary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reading through the issue, should we add a sentence around recommending to disable the error log level of CaptureConsole when using react?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, will do

@AbhiPrasad AbhiPrasad merged commit 57a1957 into master Aug 4, 2023
6 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-capture-console-react branch August 4, 2023 13:45
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants