Skip to content

Commit

Permalink
wrap write operation in try-catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimkibana committed Feb 13, 2022
1 parent 6627bd8 commit f010c04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/embeddable_explorer/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f010c04

Please sign in to comment.