forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Embeddable Rebuild] Better error handling (elastic#185903)
Closes elastic#184962 ## Summary This PR adds error handling to the `ReactEmbeddableRenderer` component so that, if any error is thrown when trying to build the API / embeddable (i.e. when the state is deserialized, when the embeddable is being built, etc.), the resulting panel will be deletable. The previous error handling assumed that the API would always exist, which isn't necessarily true - this handles this scenario by providing a dummy API (which provides a blocking error **and** access to the parent API to allow for panel deletion) to the presentation panel when an error is thrown in `ReactEmbeddableRenderer` | Before | After | |--------|--------| | ![image](https://github.com/elastic/kibana/assets/8698078/e3ed043e-5ab6-49a2-b5ce-d5ee7a5f394f) | ![image](https://github.com/elastic/kibana/assets/8698078/406cf098-88b6-4387-ac25-43f711505c2b) | | No panel actions available, since no API is provided to the presentation panel | ![image](https://github.com/elastic/kibana/assets/8698078/45010401-63dc-4259-8b1b-3914d791f2cf) | | ![image](https://github.com/elastic/kibana/assets/8698078/f3973864-a1cb-4f2d-ab80-9630a9d620c8) | ![image](https://github.com/elastic/kibana/assets/8698078/e36bd761-b932-401a-85e3-5d9059b63392) | ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- Loading branch information
Showing
2 changed files
with
135 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters