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

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

Open
alisonelizabeth opened this issue Dec 2, 2020 · 2 comments
Open

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

alisonelizabeth opened this issue Dec 2, 2020 · 2 comments
Labels
chore Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@alisonelizabeth
Copy link
Contributor

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

@alisonelizabeth alisonelizabeth added the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Dec 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@cjcenizal
Copy link
Contributor

If we migrate to the new JS client first (#73973), then we'll just need to verify that full ES errors are surfaced in SectionError as part of the migration, and then we'll be able to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

3 participants