Skip to content

Commit b43a101

Browse files
Abdullah KhanAbdullah Khan
authored andcommitted
feat(source-map-config-issues): Iterating
1 parent 8b5e24a commit b43a101

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

static/app/components/events/interfaces/crashContent/exception/content.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function InnerContent({
165165
hasChainedExceptions: boolean;
166166
hiddenExceptions: ExceptionRenderStateMap;
167167
isSampleError: boolean;
168-
sourceMapDebuggerData: SourceMapDebugBlueThunderResponse | undefined;
168+
sourceMapDebuggerData: SourceMapDebugBlueThunderResponse;
169169
toggleRelatedExceptions: (exceptionId: number) => void;
170170
values: ExceptionValue[];
171171
project?: Project;
@@ -266,9 +266,11 @@ export function Content({
266266
}: Props) {
267267
const {projects} = useProjects({slugs: [projectSlug]});
268268

269-
const {data: sourceMapDebuggerData} = useSourceMapDebugQuery(projectSlug, event.id, {
270-
sdkName: event.sdk?.name ?? null,
271-
});
269+
const {data: sourceMapDebuggerData} = useSourceMapDebugQuery(
270+
projectSlug,
271+
event.id,
272+
event.sdk?.name ?? null
273+
);
272274
const {hiddenExceptions, toggleRelatedExceptions, expandException} =
273275
useHiddenExceptions(values);
274276

static/app/components/events/interfaces/crashContent/exception/useSourceMapDebuggerData.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export interface SourceMapDebugBlueThunderResponse {
5252
export function useSourceMapDebugQuery(
5353
projectSlug: string,
5454
eventId: string,
55-
options?: {sdkName?: string | null}
55+
sdkName: string | null = null
5656
) {
5757
const organization = useOrganization({allowNull: true});
58-
const isSdkThatShouldShowSourceMapsDebugger = options?.sdkName
59-
? options.sdkName.startsWith('sentry.javascript.')
58+
const isSdkThatShouldShowSourceMapsDebugger = sdkName
59+
? sdkName.startsWith('sentry.javascript.')
6060
: true;
6161
return useApiQuery<SourceMapDebugBlueThunderResponse>(
6262
[

static/app/components/stackTrace/issueStackTrace/issueSourceMapsDebuggerAction.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ export function IssueSourceMapsDebuggerAction() {
2727
const {data: sourceMapDebuggerData} = useSourceMapDebugQuery(
2828
project?.slug ?? '',
2929
event.id,
30-
{
31-
sdkName: event.sdk?.name ?? null,
32-
}
30+
event.sdk?.name ?? null
3331
);
3432
const debuggerFrame =
3533
exceptionIndex === undefined

static/app/views/issueDetails/configurationIssues/sourceMapIssues/diagnosisSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export function DiagnosisSection({sourceMapQuery}: DiagnosisSectionProps) {
156156
if (isPending) {
157157
return <LoadingIndicator mini />;
158158
}
159-
if (isError || !data) {
159+
if (isError) {
160160
return (
161161
<LoadingError
162162
message={t('Unable to load source map diagnostic information for this event.')}

static/app/views/issueDetails/configurationIssues/sourceMapIssues/problemSection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export function ProblemSection() {
2121
size="sm"
2222
icon={<IconInfo />}
2323
external
24+
// TODO Abdullah Khan: Look into adding platform specific links to source map docs
2425
href="https://docs.sentry.io/platforms/javascript/sourcemaps/"
2526
>
2627
{t('Why configure source maps?')}

static/app/views/issueDetails/configurationIssues/sourceMapIssues/sourceMapIssueDetails.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ interface SourceMapIssueDetailsProps {
1717
export function SourceMapIssueDetails({event, project}: SourceMapIssueDetailsProps) {
1818
const sourceMapQuery = useSourceMapDebugQuery(
1919
project.slug,
20-
event.occurrence?.evidenceData?.sampleEventId
20+
event.occurrence?.evidenceData?.sampleEventId,
21+
event.sdk?.name ?? null
2122
);
2223

2324
return (

static/app/views/issueDetails/streamline/context.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ export const enum SectionKey {
103103

104104
PROFILE_PREVIEW = 'profile-preview',
105105
STACKTRACE_FLAMEGRAPH = 'stacktrace-flamegraph',
106-
107-
CONFIGURATION_PROBLEM = 'configuration-problem',
108-
CONFIGURATION_DIAGNOSIS = 'configuration-diagnosis',
109-
CONFIGURATION_TROUBLESHOOTING = 'configuration-troubleshooting',
110106
}
111107

112108
/**

0 commit comments

Comments
 (0)