Hi there!
I’m trying to use Additional Data in order to further debug an issue.
According to the documentation, I can do this and it should add additional data to each issue once it’s in the codebase.
Sentry.configureScope(function(scope) {
scope.setExtra("character_name", "Mighty Fighter")
})
In my case, I’m doing this inside a submit method in a React app, so my code looks something like this…
handleSubmit (e) {
e.preventDefault()
try {
// Code to try
} catch (error) {
Sentry.configureScope(function (scope) {
scope.setExtra('error_location', 'email verification handleSubmit')
scope.setExtra('component_state', this.state)
scope.setExtra('component_props', this.props)
Sentry.captureException(error)
})
}
}
However, when I look at my latest issue where an error occurs in this piece of code, no additional data shows up.
The only difference in my code is that I’m calling captureException
after setting the additional data. Is this incorrect? If so, please advise what I should do in order to ensure the additional data gets displayed on the issue.
Really appreciate any help on this. Thank you.