Voeg Sentry-foutregistratie toe als gekozen logging-bestemming

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-07-25 13:15:18 +02:00
co-authored by Junie
parent 7e53d4d7e2
commit 7680feb29f
12 changed files with 190 additions and 13 deletions
+2
View File
@@ -1,5 +1,6 @@
import { Component } from 'react';
import type { ErrorInfo, ReactNode } from 'react';
import * as Sentry from '@sentry/react';
interface ErrorBoundaryProps {
children: ReactNode;
@@ -22,6 +23,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
componentDidCatch(error: Error, info: ErrorInfo): void {
console.error('Unexpected application error', error, info);
Sentry.captureException(error, { extra: { componentStack: info.componentStack } });
}
render(): ReactNode {