docs(changeset): feat(error-manager): implement centralized error reporting system
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import React, { type PropsWithChildren } from 'react';
|
||||
|
||||
import errorManager from './ErrorManager';
|
||||
|
||||
interface ErrorBoundaryProps extends PropsWithChildren {
|
||||
namespace?: string;
|
||||
onReportClick?: () => void;
|
||||
@@ -43,7 +46,12 @@ export class ReactBasicErrorBoundary extends React.PureComponent<
|
||||
errorInfo,
|
||||
try: false,
|
||||
});
|
||||
// You can also log error messages to an error reporting service here
|
||||
|
||||
// Report error to error manager (Sentry, custom API, etc.)
|
||||
errorManager.reportError(error, errorInfo, {
|
||||
componentStack: errorInfo?.componentStack,
|
||||
namespace: this.props.namespace,
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user