You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Expandabletitle="Do you need to customize your handleError function?">
367
+
If you have custom logic in your `handleError` function, you'll need to capture errors manually:
368
+
369
+
```tsx {12}
370
+
import {
371
+
getMetaTagTransformer,
372
+
wrapSentryHandleRequest,
373
+
} from"@sentry/react-router";
374
+
// ... other imports
375
+
376
+
exportfunction handleError(
377
+
error:unknown,
378
+
{
379
+
request,
380
+
params,
381
+
context,
382
+
}:LoaderFunctionArgs|ActionFunctionArgs
383
+
) {
384
+
if (!request.signal.aborted) {
385
+
Sentry.captureException(error);
386
+
console.error(formatErrorForJsonLogging(error));
387
+
}
388
+
}
389
+
390
+
// ... rest of your entry.server.ts file
391
+
```
392
+
393
+
</Expandable>
394
+
372
395
### Update Scripts
373
396
374
397
Since React Router is running in ESM mode, you need to use the `--import` command line options to load our server-side instrumentation module before the application starts.
0 commit comments