Skip to content

Commit c96af89

Browse files
committed
update e2e
1 parent 1811525 commit c96af89

File tree

14 files changed

+7
-29
lines changed

14 files changed

+7
-29
lines changed

dev-packages/e2e-tests/test-applications/hydrogen-react-router-7/app/entry.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ startTransition(() => {
1616
hydrateRoot(
1717
document,
1818
<StrictMode>
19-
<HydratedRouter />
19+
<HydratedRouter onError={Sentry.sentryOnError} />
2020
</StrictMode>,
2121
);
2222
});

dev-packages/e2e-tests/test-applications/hydrogen-react-router-7/app/root.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Sentry from '@sentry/react-router/cloudflare';
21
import { type LoaderFunctionArgs } from '@shopify/remix-oxygen';
32
import {
43
Outlet,
@@ -160,8 +159,6 @@ export function ErrorBoundary({ error }: { error: unknown }) {
160159
let errorMessage = 'Unknown error';
161160
let errorStatus = 500;
162161

163-
const eventId = Sentry.captureException(error);
164-
165162
if (isRouteErrorResponse(error)) {
166163
errorMessage = error?.data?.message ?? error.data;
167164
errorStatus = error.status;
@@ -178,11 +175,6 @@ export function ErrorBoundary({ error }: { error: unknown }) {
178175
<pre>{errorMessage}</pre>
179176
</fieldset>
180177
)}
181-
{eventId && (
182-
<h2>
183-
Sentry Event ID: <code>{eventId}</code>
184-
</h2>
185-
)}
186178
</div>
187179
);
188180
}

dev-packages/e2e-tests/test-applications/react-router-7-framework-custom/app/entry.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ startTransition(() => {
1717
hydrateRoot(
1818
document,
1919
<StrictMode>
20-
<HydratedRouter />
20+
<HydratedRouter onError={Sentry.sentryOnError} />
2121
</StrictMode>,
2222
);
2323
});

dev-packages/e2e-tests/test-applications/react-router-7-framework-custom/app/root.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Sentry from '@sentry/react-router';
21
import { Links, Meta, Outlet, Scripts, ScrollRestoration, isRouteErrorResponse } from 'react-router';
32
import type { Route } from './+types/root';
43
import stylesheet from './app.css?url';
@@ -48,7 +47,6 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
4847
message = error.status === 404 ? '404' : 'Error';
4948
details = error.status === 404 ? 'The requested page could not be found.' : error.statusText || details;
5049
} else if (error && error instanceof Error) {
51-
Sentry.captureException(error);
5250
if (import.meta.env.DEV) {
5351
details = error.message;
5452
stack = error.stack;

dev-packages/e2e-tests/test-applications/react-router-7-framework-instrumentation/app/entry.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ startTransition(() => {
2727
document,
2828
<StrictMode>
2929
{/* unstable_instrumentations is React Router 7.x's prop name (will become `instrumentations` in v8) */}
30-
<HydratedRouter unstable_instrumentations={sentryClientInstrumentation} />
30+
<HydratedRouter unstable_instrumentations={sentryClientInstrumentation} onError={Sentry.sentryOnError} />
3131
</StrictMode>,
3232
);
3333
});

dev-packages/e2e-tests/test-applications/react-router-7-framework-instrumentation/app/root.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Sentry from '@sentry/react-router';
21
import { Links, Meta, Outlet, Scripts, ScrollRestoration, isRouteErrorResponse } from 'react-router';
32
import type { Route } from './+types/root';
43
import stylesheet from './app.css?url';
@@ -48,7 +47,6 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
4847
message = error.status === 404 ? '404' : 'Error';
4948
details = error.status === 404 ? 'The requested page could not be found.' : error.statusText || details;
5049
} else if (error && error instanceof Error) {
51-
Sentry.captureException(error);
5250
if (import.meta.env.DEV) {
5351
details = error.message;
5452
stack = error.stack;

dev-packages/e2e-tests/test-applications/react-router-7-framework-node-20-18/app/entry.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ startTransition(() => {
1717
hydrateRoot(
1818
document,
1919
<StrictMode>
20-
<HydratedRouter />
20+
<HydratedRouter onError={Sentry.sentryOnError} />
2121
</StrictMode>,
2222
);
2323
});

dev-packages/e2e-tests/test-applications/react-router-7-framework-node-20-18/app/root.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Sentry from '@sentry/react-router';
21
import { Links, Meta, Outlet, Scripts, ScrollRestoration, isRouteErrorResponse } from 'react-router';
32
import type { Route } from './+types/root';
43
import stylesheet from './app.css?url';
@@ -48,7 +47,6 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
4847
message = error.status === 404 ? '404' : 'Error';
4948
details = error.status === 404 ? 'The requested page could not be found.' : error.statusText || details;
5049
} else if (error && error instanceof Error) {
51-
Sentry.captureException(error);
5250
if (import.meta.env.DEV) {
5351
details = error.message;
5452
stack = error.stack;

dev-packages/e2e-tests/test-applications/react-router-7-framework-spa-node-20-18/app/entry.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ startTransition(() => {
1717
hydrateRoot(
1818
document,
1919
<StrictMode>
20-
<HydratedRouter />
20+
<HydratedRouter onError={Sentry.sentryOnError} />
2121
</StrictMode>,
2222
);
2323
});

dev-packages/e2e-tests/test-applications/react-router-7-framework-spa-node-20-18/app/root.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { isRouteErrorResponse, Links, Meta, Outlet, Scripts, ScrollRestoration }
22

33
import type { Route } from './+types/root';
44
import './app.css';
5-
import * as Sentry from '@sentry/react-router';
65

76
export function Layout({ children }: { children: React.ReactNode }) {
87
return (
@@ -35,8 +34,6 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
3534
message = error.status === 404 ? '404' : 'Error';
3635
details = error.status === 404 ? 'The requested page could not be found.' : error.statusText || details;
3736
} else if (error && error instanceof Error) {
38-
Sentry.captureException(error);
39-
4037
details = error.message;
4138
stack = error.stack;
4239
}

0 commit comments

Comments
 (0)