Skip to content

[ES UI] Audit plugins using <SectionError/> component #84801

Open

Description

A majority of our apps no longer display the full ES error in the UI when a request fails, which can cause confusion to a user when they are trying to troubleshoot the failure.

As part of #84184, a es_error_parser.ts reusable handler was created in the es_ui_shared/server folder.

We need to audit our existing apps that are using the <SectionError/> component and update the server code to use this utility. Example usage:

      if (lib.isEsError(e)) {
          const error = lib.parseEsError(e.response);
          return res.customError({
            statusCode: e.statusCode,
            body: {
              message: error.message,
              attributes: error,
            },
          });
        }
        // Case: default
        return res.internalError({ body: e });

Note that there is already a handleEsError handler for the new ES js client that we should incorporate this logic in. We should also consider if it makes sense to create a similar handler for the legacy client.

Related issues: #77165, #63270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Team:Kibana ManagementDev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and morechore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions