Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Visualize] Do not display a toast about missing provider when error is displayed #189866

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -527,20 +527,27 @@ export class VisualizeEmbeddable
}

private renderError(error: ErrorLike | string) {
const { core } = this.deps.start();
if (isFallbackDataView(this.vis.data.indexPattern)) {
return (
<VisualizationMissedSavedObjectError
renderMode={this.input.renderMode ?? 'view'}
savedObjectMeta={{
savedObjectType: this.vis.data.savedSearchId ? 'search' : DATA_VIEW_SAVED_OBJECT_TYPE,
}}
application={getApplication()}
message={typeof error === 'string' ? error : error.message}
/>
<KibanaRenderContextProvider {...core}>
<VisualizationMissedSavedObjectError
renderMode={this.input.renderMode ?? 'view'}
savedObjectMeta={{
savedObjectType: this.vis.data.savedSearchId ? 'search' : DATA_VIEW_SAVED_OBJECT_TYPE,
}}
application={getApplication()}
message={typeof error === 'string' ? error : error.message}
/>
</KibanaRenderContextProvider>
);
}

return <VisualizationError error={error} />;
return (
<KibanaRenderContextProvider {...core}>
<VisualizationError error={error} />
</KibanaRenderContextProvider>
);
}

public destroy() {
Expand Down