in client/components/mma/shared/AsyncLoader.tsx [112:128]
private handleError(error: Error | ErrorEvent | string): void {
if (
!(
this.props.shouldPreventErrorRender &&
this.props.shouldPreventErrorRender()
)
) {
this.setState({ loadingState: LoadingState.Error });
}
trackEvent({
eventCategory: 'asyncLoader',
eventAction: 'error',
// eslint-disable-next-line @typescript-eslint/no-base-to-string -- Error.toString will output a string
eventLabel: error ? error.toString() : undefined,
});
Sentry.captureException(error);
}