-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Time to Visualize] Embeddable Error Handling #81399
Copy link
Copy link
Closed
Labels
Feature:DashboardDashboard related featuresDashboard related featuresProject:TimeToVisualizeTeam:PresentationPresentation Team for Dashboard, Input Controls, and Canvas t//Presentation Team for Dashboard, Input Controls, and Canvas t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceregression
Metadata
Metadata
Assignees
Labels
Feature:DashboardDashboard related featuresDashboard related featuresProject:TimeToVisualizeTeam:PresentationPresentation Team for Dashboard, Input Controls, and Canvas t//Presentation Team for Dashboard, Input Controls, and Canvas t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceregression
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
As part of the Time to Visualize project, some embeddables have had their saved object loading responsibilities shifted from the Embeddable Factory, to the Embeddable itself.
The dashboard code is currently set up in such a way that only errors that are thrown during one of the embeddable factory create methods are turned into a proper ErrorEmbeddable:
This causes a bug where any error in the creation of the Embeddable results in a totally blank embeddable.
Expected
Steps to reproduce
Potential Solution
What we need is a way for embeddables themselves to catch and throw errors that the embeddable panel can subscribe to, in order to render an
ErrorEmbeddableinstead. I can think of two ways to accomplish this:Add an
onError$observable of typeErrorEmbeddabletoi_embeddableand the abstractembeddable.tsx. Have the embeddable panel subscribe to this, which will destroy the existing embeddable and replace it with the error embeddable. This works, though it could easily be improved upon. [Time to Visualize] Embeddable Error Handling Via OnError Observable #81402Add a
fatalErrorproperty of typeErrorEmbeddabletoIEmbeddableOutput(something similar has been done before for the error badge). In the embeddable panel's output subscription, if the fatalError prop is present, destroy the existing embeddable and replace it with the error embeddable. This may be a cleaner solution.@Dosant @streamich @stacey-gammon. Let me know if you have any other ideas!