Skip to content

Commit 4b9c794

Browse files
authored
feat(source-maps): Update copy for source map debug alerts (#45164)
this pr updates some copy for the source map debug alerts and adds in a missing alert.
1 parent e81b9f4 commit 4b9c794

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('SourceMapDebug', () => {
9999
});
100100
expect(
101101
await screen.findByText(
102-
"We've encountered 1 problem de-minifying your applications source code!"
102+
"We've encountered 1 problem un-minifying your applications source code!"
103103
)
104104
).toBeInTheDocument();
105105

@@ -132,7 +132,7 @@ describe('SourceMapDebug', () => {
132132
});
133133
expect(
134134
await screen.findByText(
135-
"We've encountered 1 problem de-minifying your applications source code!"
135+
"We've encountered 1 problem un-minifying your applications source code!"
136136
)
137137
).toBeInTheDocument();
138138

@@ -161,12 +161,12 @@ describe('SourceMapDebug', () => {
161161
});
162162
expect(
163163
await screen.findByText(
164-
"We've encountered 1 problem de-minifying your applications source code!"
164+
"We've encountered 1 problem un-minifying your applications source code!"
165165
)
166166
).toBeInTheDocument();
167167

168168
const expandedMessage =
169-
'The given abs_path of the stack frame is absValue which is not a valid URL. Please refer to the instructions in our docs guide for help with troubleshooting the issue.';
169+
'The abs_path of the stack frame is absValue which is not a valid URL. Read our docs for troubleshooting help.';
170170
expect(
171171
screen.queryByText(textWithMarkupMatcher(expandedMessage))
172172
).not.toBeInTheDocument();

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

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function getErrorMessage(
6363
{
6464
title: t('Event missing Release tag'),
6565
desc: t(
66-
'Integrate Sentry into your release pipeline. You can do this with a tool like Webpack or using the CLI.'
66+
'Integrate Sentry into your release pipeline using a tool like Webpack or the CLI.'
6767
),
6868
docsLink: defaultDocsLink,
6969
},
@@ -90,7 +90,7 @@ function getErrorMessage(
9090
{
9191
title: t('Sentry not part of release pipeline'),
9292
desc: tct(
93-
'Integrate Sentry into your release pipeline. You can do this with a tool like Webpack or using the CLI. Please note the release must be the same as being set in your [init]. The value for this event is [version].',
93+
"Integrate Sentry into your release pipeline using a tool like Webpack or the CLI. Your release must match what's set in your [init]. The value for this event is [version].",
9494
{
9595
init: sentryInit,
9696
version: <code>{error.data.version}</code>,
@@ -104,7 +104,7 @@ function getErrorMessage(
104104
{
105105
title: t('Source Maps not uploaded'),
106106
desc: t(
107-
'It looks like you are creating but not uploading your source maps. Please refer to the instructions in our docs guide for help with troubleshooting the issue.'
107+
"It looks like you're creating, but not uploading your source maps. Read our docs for troubleshooting help."
108108
),
109109
docsLink: defaultDocsLink,
110110
},
@@ -114,7 +114,7 @@ function getErrorMessage(
114114
{
115115
title: t('Invalid Absolute Path URL'),
116116
desc: tct(
117-
'The given [literalAbsPath] of the stack frame is [absPath] which is not a valid URL. Please refer to the instructions in our docs guide for help with troubleshooting the issue.',
117+
'The [literalAbsPath] of the stack frame is [absPath] which is not a valid URL. Read our docs for troubleshooting help.',
118118
{
119119
absPath: <code>{error.data.absPath}</code>,
120120
literalAbsPath: <code>abs_path</code>,
@@ -130,7 +130,7 @@ function getErrorMessage(
130130
{
131131
title: t('Absolute Path Mismatch'),
132132
desc: tct(
133-
"The given [literalAbsPath] of the stack frame is [absPath] which doesn't match any release artifact. Please refer to the instructions in our docs guide for help with troubleshooting the issue.",
133+
"The given [literalAbsPath] of the stack frame is [absPath] which doesn't match any release artifact. Read our docs for troubleshooting help.",
134134
{
135135
absPath: <code>{error.data.absPath}</code>,
136136
literalAbsPath: <code>abs_path</code>,
@@ -146,7 +146,7 @@ function getErrorMessage(
146146
{
147147
title: t('Dist Mismatch'),
148148
desc: tct(
149-
"The distribution identifier you are providing doesn't match. The [literalDist] value of [dist] configured in your [init] must be the same as the one used during source map upload. Please refer to the instructions in our docs guide for help with troubleshooting the issue.",
149+
"The distribution identifier you're providing doesn't match. The [literalDist] value of [dist] configured in your [init] must be the same as the one used during source map upload. Read our docs for troubleshooting help.",
150150
{
151151
init: sentryInit,
152152
dist: <code>dist</code>,
@@ -158,6 +158,16 @@ function getErrorMessage(
158158
),
159159
},
160160
];
161+
case SourceMapProcessingIssueType.SOURCEMAP_NOT_FOUND:
162+
return [
163+
{
164+
title: t("Source Map File doesn't exist"),
165+
desc: t(
166+
"Sentry couldn't fetch the source map file for this event. Read our docs for troubleshooting help."
167+
),
168+
docsLink: getTroubleshootingLink(),
169+
},
170+
];
161171
case SourceMapProcessingIssueType.UNKNOWN_ERROR:
162172
default:
163173
return [];
@@ -308,8 +318,8 @@ export function SourceMapDebug({debugFrames, event}: SourcemapDebugProps) {
308318
}
309319
>
310320
{tn(
311-
"We've encountered %s problem de-minifying your applications source code!",
312-
"We've encountered %s problems de-minifying your applications source code!",
321+
"We've encountered %s problem un-minifying your applications source code!",
322+
"We've encountered %s problems un-minifying your applications source code!",
313323
errorMessages.length
314324
)}
315325
</Alert>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ interface PartialMatchDebugError extends BaseSourceMapDebugError {
3636
interface DistMismatchDebugError extends BaseSourceMapDebugError {
3737
type: SourceMapProcessingIssueType.DIST_MISMATCH;
3838
}
39+
interface SourcemapNotFoundDebugError extends BaseSourceMapDebugError {
40+
type: SourceMapProcessingIssueType.SOURCEMAP_NOT_FOUND;
41+
}
3942
interface NoURLMatchDebugError extends BaseSourceMapDebugError {
4043
data: {absPath: string};
4144
type: SourceMapProcessingIssueType.NO_URL_MATCH;
@@ -49,6 +52,7 @@ export type SourceMapDebugError =
4952
| UrlNotValidDebugError
5053
| PartialMatchDebugError
5154
| DistMismatchDebugError
55+
| SourcemapNotFoundDebugError
5256
| NoURLMatchDebugError;
5357

5458
export interface SourceMapDebugResponse {
@@ -64,6 +68,7 @@ export enum SourceMapProcessingIssueType {
6468
NO_URL_MATCH = 'no_url_match',
6569
PARTIAL_MATCH = 'partial_match',
6670
DIST_MISMATCH = 'dist_mismatch',
71+
SOURCEMAP_NOT_FOUND = 'sourcemap_not_found',
6772
}
6873

6974
const sourceMapDebugQuery = ({

0 commit comments

Comments
 (0)