As described in this Slack message, we have two types of error boundaries:
- EuiErrorBoundary
- KibanaErrorBoundary provided by KibanaRenderContextProvider (Which is going to be replaced by
core.rendering.addContext as per this email)
KibanaErrorBoundary also sends an EBT event, so we would like to remove EuiErrorBoundary and use error boundary implementation in KibanaErrorBoundary instead.
Why?
- Inconsistent error handling in the UI
- Errors handled by EuiErrorBoundary do not report any telemetry thus, we’re missing data
In the previous ticket, we did some investigation, but each case is different, and we need to verify that by removing EuiErrorBoundary, errors will be shown correctly as before. In some cases, if the error is known, we should add a try/catch to handle it properly with a specific error instead of just throwing it as a fatal error.
AC
When removing the EuiErrorBoundary:
- Check if throwing an error will show the KibanaErrorBoundary correctly
- If EuiErrorBoundary is added to avoid bubbling the error to the page level, consider using KibanaSectionErrorBoundary
- For the errors that are known (such as validation error), make sure that they are caught, handled, and reported in a separate flow than KibanaErrorBoundary (Reserve KibanaErrorBoundary only for unknown errors)
As described in this Slack message, we have two types of error boundaries:
core.rendering.addContextas per this email)KibanaErrorBoundary also sends an EBT event, so we would like to remove EuiErrorBoundary and use error boundary implementation in KibanaErrorBoundary instead.
Why?
In the previous ticket, we did some investigation, but each case is different, and we need to verify that by removing EuiErrorBoundary, errors will be shown correctly as before. In some cases, if the error is known, we should add a try/catch to handle it properly with a specific error instead of just throwing it as a fatal error.
AC
When removing the EuiErrorBoundary:
- Check if throwing an error will show the KibanaErrorBoundary correctly
- If EuiErrorBoundary is added to avoid bubbling the error to the page level, consider using KibanaSectionErrorBoundary
- For the errors that are known (such as validation error), make sure that they are caught, handled, and reported in a separate flow than KibanaErrorBoundary (Reserve KibanaErrorBoundary only for unknown errors)