Skip to content

Commit 1a83bd5

Browse files
[8.19] [Obs AI Assistant] replace EuiErrorBoundary with KibanaErrorBoundary (#229710) (#229856)
# Backport This will backport the following commits from `main` to `8.19`: - [[Obs AI Assistant] replace EuiErrorBoundary with KibanaErrorBoundary (#229710)](#229710) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sandra G","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-29T17:21:18Z","message":"[Obs AI Assistant] replace EuiErrorBoundary with KibanaErrorBoundary (#229710)\n\nReplaces `EuiErrorBoundary` with using `core.rendering.addContext()`.\n\n\nhttps://github.com/elastic/kibana/blob/main/src/core/packages/rendering/browser/README.mdx\n\nI tested this by throwing an error in the feedback buttons and the AI\nAssistant button itself and confirmed they are caught by the\n`KibanaErrorBoundary`.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"d73f9eef6031eb4ee7f3d1d99935eaa8c98dc522","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:all-open","ci:project-deploy-observability","v9.2.0"],"title":"[Obs AI Assistant] replace EuiErrorBoundary with KibanaErrorBoundary","number":229710,"url":"https://github.com/elastic/kibana/pull/229710","mergeCommit":{"message":"[Obs AI Assistant] replace EuiErrorBoundary with KibanaErrorBoundary (#229710)\n\nReplaces `EuiErrorBoundary` with using `core.rendering.addContext()`.\n\n\nhttps://github.com/elastic/kibana/blob/main/src/core/packages/rendering/browser/README.mdx\n\nI tested this by throwing an error in the feedback buttons and the AI\nAssistant button itself and confirmed they are caught by the\n`KibanaErrorBoundary`.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"d73f9eef6031eb4ee7f3d1d99935eaa8c98dc522"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229710","number":229710,"mergeCommit":{"message":"[Obs AI Assistant] replace EuiErrorBoundary with KibanaErrorBoundary (#229710)\n\nReplaces `EuiErrorBoundary` with using `core.rendering.addContext()`.\n\n\nhttps://github.com/elastic/kibana/blob/main/src/core/packages/rendering/browser/README.mdx\n\nI tested this by throwing an error in the feedback buttons and the AI\nAssistant button itself and confirmed they are caught by the\n`KibanaErrorBoundary`.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"d73f9eef6031eb4ee7f3d1d99935eaa8c98dc522"}}]}] BACKPORT--> Co-authored-by: Sandra G <[email protected]>
1 parent dbd3c33 commit 1a83bd5

File tree

1 file changed

+16
-19
lines changed
  • x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/utils

1 file changed

+16
-19
lines changed

x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/utils/shared_providers.tsx

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* 2.0; you may not use this file except in compliance with the Elastic License
55
* 2.0.
66
*/
7-
import { EuiErrorBoundary } from '@elastic/eui';
87
import type { CoreStart, CoreTheme } from '@kbn/core/public';
98
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
109
import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme';
@@ -31,23 +30,21 @@ export function SharedProviders({
3130
return { theme$ };
3231
}, [theme$]);
3332

34-
return (
35-
<EuiErrorBoundary>
36-
<KibanaThemeProvider theme={theme}>
37-
<KibanaContextProvider
38-
services={{
39-
...coreStart,
40-
...pluginsStart,
41-
plugins: {
42-
start: pluginsStart,
43-
},
44-
}}
45-
>
46-
<RedirectAppLinks coreStart={coreStart}>
47-
<coreStart.i18n.Context>{children}</coreStart.i18n.Context>
48-
</RedirectAppLinks>
49-
</KibanaContextProvider>
50-
</KibanaThemeProvider>
51-
</EuiErrorBoundary>
33+
return coreStart.rendering.addContext(
34+
<KibanaThemeProvider theme={theme}>
35+
<KibanaContextProvider
36+
services={{
37+
...coreStart,
38+
...pluginsStart,
39+
plugins: {
40+
start: pluginsStart,
41+
},
42+
}}
43+
>
44+
<RedirectAppLinks coreStart={coreStart}>
45+
<coreStart.i18n.Context>{children}</coreStart.i18n.Context>
46+
</RedirectAppLinks>
47+
</KibanaContextProvider>
48+
</KibanaThemeProvider>
5249
);
5350
}

0 commit comments

Comments
 (0)