Skip to content

Functionality of Sentry's Error Boundary in React #9212

Answered by AbhiPrasad
filiptammergard asked this question in Q&A
Discussion options

You must be logged in to vote

Because with the error boundary you get the react component stack attached to your error. Sentry also makes this part of the exception object, so they will get sourcemapped!

Here's a example from the Sentry codebase. The main stacktrace:

and then the stacktrace from the component stack that represents the component chain to the component that threw the error

This extra context is useful when trying to figure out what HOC/parent components were involved when rendering the component that threw the error.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@filiptammergard
Comment options

@AbhiPrasad
Comment options

@filiptammergard
Comment options

@filiptammergard
Comment options

@AbhiPrasad
Comment options

Answer selected by filiptammergard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants