diff --git a/static/app/gettingStartedDocs/javascript-react-router/onboarding.tsx b/static/app/gettingStartedDocs/javascript-react-router/onboarding.tsx
index 3f09882d960039..1faf7cb1c892c1 100644
--- a/static/app/gettingStartedDocs/javascript-react-router/onboarding.tsx
+++ b/static/app/gettingStartedDocs/javascript-react-router/onboarding.tsx
@@ -109,14 +109,11 @@ const handleRequest = Sentry.createSentryHandleRequest({
export default handleRequest;
-export const handleError: HandleErrorFunction = (error, { request }) => {
- // React Router may abort some interrupted requests, don't log those
- if (!request.signal.aborted) {
- Sentry.captureException(error);
- // optionally log the error to the console so you can see it
- console.error(error);
- }
-};`;
+export const handleError = Sentry.createSentryHandleError({
+ logErrors: false
+});
+
+// ... rest of your server entry`;
const getVerifySnippet = (params: DocsParams) => {
const logsCode = params.isLogsSelected
@@ -303,7 +300,7 @@ export const onboarding: OnboardingConfig = {
'To upload source maps to Sentry, follow the [link:instructions in our documentation].',
{
link: (
-
+
),
}
),