mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Make embeddable example plugin not fail for read-only user (#125459)
* wrap write operation in try-catch block * add space
This commit is contained in:
parent
759f87b1f2
commit
8f4de1b8a8
1 changed files with 6 additions and 1 deletions
|
@ -34,7 +34,12 @@ export class EmbeddableExplorerPlugin implements Plugin<void, void, {}, StartDep
|
|||
async mount(params: AppMountParameters) {
|
||||
const [coreStart, depsStart] = await core.getStartServices();
|
||||
const { renderApp } = await import('./app');
|
||||
await depsStart.embeddableExamples.createSampleData();
|
||||
try {
|
||||
await depsStart.embeddableExamples.createSampleData();
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('Failed to create sample data', error);
|
||||
}
|
||||
return renderApp(
|
||||
{
|
||||
notifications: coreStart.notifications,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue