Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('SourceMapDebug', () => {
});
expect(
await screen.findByText(
"We've encountered 1 problem de-minifying your applications source code!"
"We've encountered 1 problem un-minifying your applications source code!"
)
).toBeInTheDocument();

Expand Down Expand Up @@ -132,7 +132,7 @@ describe('SourceMapDebug', () => {
});
expect(
await screen.findByText(
"We've encountered 1 problem de-minifying your applications source code!"
"We've encountered 1 problem un-minifying your applications source code!"
)
).toBeInTheDocument();

Expand Down Expand Up @@ -161,12 +161,12 @@ describe('SourceMapDebug', () => {
});
expect(
await screen.findByText(
"We've encountered 1 problem de-minifying your applications source code!"
"We've encountered 1 problem un-minifying your applications source code!"
)
).toBeInTheDocument();

const expandedMessage =
'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.';
'The abs_path of the stack frame is absValue which is not a valid URL. Read our docs for troubleshooting help.';
expect(
screen.queryByText(textWithMarkupMatcher(expandedMessage))
).not.toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function getErrorMessage(
{
title: t('Event missing Release tag'),
desc: t(
'Integrate Sentry into your release pipeline. You can do this with a tool like Webpack or using the CLI.'
'Integrate Sentry into your release pipeline using a tool like Webpack or the CLI.'
),
docsLink: defaultDocsLink,
},
Expand All @@ -90,7 +90,7 @@ function getErrorMessage(
{
title: t('Sentry not part of release pipeline'),
desc: tct(
'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].',
"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].",
{
init: sentryInit,
version: <code>{error.data.version}</code>,
Expand All @@ -104,7 +104,7 @@ function getErrorMessage(
{
title: t('Source Maps not uploaded'),
desc: t(
'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.'
"It looks like you're creating, but not uploading your source maps. Read our docs for troubleshooting help."
),
docsLink: defaultDocsLink,
},
Expand All @@ -114,7 +114,7 @@ function getErrorMessage(
{
title: t('Invalid Absolute Path URL'),
desc: tct(
'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.',
'The [literalAbsPath] of the stack frame is [absPath] which is not a valid URL. Read our docs for troubleshooting help.',
{
absPath: <code>{error.data.absPath}</code>,
literalAbsPath: <code>abs_path</code>,
Expand All @@ -130,7 +130,7 @@ function getErrorMessage(
{
title: t('Absolute Path Mismatch'),
desc: tct(
"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.",
"The given [literalAbsPath] of the stack frame is [absPath] which doesn't match any release artifact. Read our docs for troubleshooting help.",
{
absPath: <code>{error.data.absPath}</code>,
literalAbsPath: <code>abs_path</code>,
Expand All @@ -146,7 +146,7 @@ function getErrorMessage(
{
title: t('Dist Mismatch'),
desc: tct(
"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.",
"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.",
{
init: sentryInit,
dist: <code>dist</code>,
Expand All @@ -158,6 +158,16 @@ function getErrorMessage(
),
},
];
case SourceMapProcessingIssueType.SOURCEMAP_NOT_FOUND:
return [
{
title: t("Source Map File doesn't exist"),
desc: t(
"Sentry couldn't fetch the source map file for this event. Read our docs for troubleshooting help."
),
docsLink: getTroubleshootingLink(),
},
];
case SourceMapProcessingIssueType.UNKNOWN_ERROR:
default:
return [];
Expand Down Expand Up @@ -308,8 +318,8 @@ export function SourceMapDebug({debugFrames, event}: SourcemapDebugProps) {
}
>
{tn(
"We've encountered %s problem de-minifying your applications source code!",
"We've encountered %s problems de-minifying your applications source code!",
"We've encountered %s problem un-minifying your applications source code!",
"We've encountered %s problems un-minifying your applications source code!",
errorMessages.length
)}
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ interface PartialMatchDebugError extends BaseSourceMapDebugError {
interface DistMismatchDebugError extends BaseSourceMapDebugError {
type: SourceMapProcessingIssueType.DIST_MISMATCH;
}
interface SourcemapNotFoundDebugError extends BaseSourceMapDebugError {
type: SourceMapProcessingIssueType.SOURCEMAP_NOT_FOUND;
}
interface NoURLMatchDebugError extends BaseSourceMapDebugError {
data: {absPath: string};
type: SourceMapProcessingIssueType.NO_URL_MATCH;
Expand All @@ -49,6 +52,7 @@ export type SourceMapDebugError =
| UrlNotValidDebugError
| PartialMatchDebugError
| DistMismatchDebugError
| SourcemapNotFoundDebugError
| NoURLMatchDebugError;

export interface SourceMapDebugResponse {
Expand All @@ -64,6 +68,7 @@ export enum SourceMapProcessingIssueType {
NO_URL_MATCH = 'no_url_match',
PARTIAL_MATCH = 'partial_match',
DIST_MISMATCH = 'dist_mismatch',
SOURCEMAP_NOT_FOUND = 'sourcemap_not_found',
}

const sourceMapDebugQuery = ({
Expand Down