-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(seer): Capture errors when updating onboarding #107683
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import {Fragment, useCallback} from 'react'; | ||
| import styled from '@emotion/styled'; | ||
| import * as Sentry from '@sentry/react'; | ||
|
|
||
| import configureCodeReviewImg from 'sentry-images/spot/seer-config-check.svg'; | ||
|
|
||
|
|
@@ -68,6 +69,9 @@ export function ConfigureCodeReviewStep() { | |
| resolve(); | ||
| }, | ||
| onError: () => { | ||
| Sentry.captureException( | ||
| new Error('Seer Onboarding: Unable to enable code review') | ||
| ); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing Sentry capture in second error handlerLow Severity The PR adds |
||
| reject(new Error(t('Failed to enable AI Code Review'))); | ||
| }, | ||
| } | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error context lost when capturing Sentry exceptions
Low Severity
The
onErrorcallback ignores the actual error returned by the mutation and creates a new genericErrorinstead. The mutation'sonErrorcallback receives the real error as its first parameter (as seen inuseAutofix.tsx), but these callbacks use() =>which discards it. This loses valuable debugging context like HTTP status codes, server error messages, and stack traces. Engineers investigating these errors in Sentry will only see generic messages like "Unable to enable code review" with no information about the actual failure cause.Additional Locations (2)
static/gsApp/views/seerAutomation/onboarding/configureDefaultsStep.tsx#L74-L81static/gsApp/views/seerAutomation/onboarding/configureRootCauseAnalysisStep.tsx#L158-L161