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 Shared] Update isEsError function for new ES client #79678

Closed
yuliacech opened this issue Oct 6, 2020 · 1 comment · Fixed by #80302
Closed

[ES UI Shared] Update isEsError function for new ES client #79678

yuliacech opened this issue Oct 6, 2020 · 1 comment · Fixed by #80302
Assignees
Labels
chore Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@yuliacech
Copy link
Contributor

yuliacech commented Oct 6, 2020

The helper function isEsError in es_ui_shared library needs to be updated as we move more plugins to the new ES js client. I think we would need to check for exception/error object to be intanceof ResponseError, which is returned by the client for 4xx and 5xx responses from ES (docs). We can then return a customError with message containing in e.body.error.reason. e.body is not yet typed, but should contain error object coming directly from the ES cluster:

{
    root_cause: string[];
    type: string;
    reason: string;
}

Migration docs link

@yuliacech yuliacech added chore Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Oct 6, 2020
@elasticmachine
Copy link
Contributor

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

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

Successfully merging a pull request may close this issue.

2 participants