Skip to content

Commit

Permalink
chore: update unable to load tracking - send screen message if screen…
Browse files Browse the repository at this point in the history
… present, tab otherwise (#11001)

send screen message if screen present, tab otherwise
  • Loading branch information
brainbicycle authored Oct 24, 2024
1 parent 4746513 commit 7f170f1
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/app/Components/LoadFailureView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,22 @@ export const LoadFailureView: React.FC<LoadFailureViewProps & BoxProps> = ({
if (shouldTrackError) {
Sentry.withScope((scope) => {
scope.setExtra("user-id", userId)
scope.setExtra("activeTab", activeTab)
if (error) {
scope.setExtra("error", error)
scope.setExtra("error-details", error)
}
Sentry.captureMessage(
"Unable to load in tab: " + activeTab + " params:" + JSON.stringify(routeParams),
"error"
)

if (routeParams) {
scope.setExtra("routeParams", JSON.stringify(routeParams))
}

const moduleName = routeParams?.moduleName
let message = "Unable to load in tab: " + activeTab
if (!!moduleName) {
message = "Unable to load in screen: " + moduleName
}

Sentry.captureMessage(message, "error")
})
}
}
Expand Down

0 comments on commit 7f170f1

Please sign in to comment.