Extension Sidebar: Prevent plugin errors from breaking Grafana (#104983)

feat(extensionsidebar): add an errorboundary to prevent crashing entire app if plugin goes pop
This commit is contained in:
Jack Westbrook
2025-05-06 15:45:44 +02:00
committed by GitHub
parent c8d92ee06a
commit b78044511f

View File

@ -2,7 +2,7 @@ import { css } from '@emotion/css';
import { GrafanaTheme2 } from '@grafana/data';
import { usePluginComponents } from '@grafana/runtime';
import { useTheme2 } from '@grafana/ui';
import { ErrorBoundaryAlert, useTheme2 } from '@grafana/ui';
import {
EXTENSION_SIDEBAR_EXTENSION_POINT_ID,
@ -45,7 +45,9 @@ export function ExtensionSidebar() {
return (
<div className={styles.sidebarWrapper}>
<div className={styles.content}>
<ExtensionComponent {...props} />
<ErrorBoundaryAlert>
<ExtensionComponent {...props} />
</ErrorBoundaryAlert>
</div>
</div>
);