[ES UI Shared] Update isEsError function for new ES client #79678
Labels
chore
Team:Kibana Management
Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
The helper function
isEsError
ines_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 beintanceof ResponseError
, which is returned by the client for 4xx and 5xx responses from ES (docs). We can then return acustomError
with message containing ine.body.error.reason
.e.body
is not yet typed, but should containerror
object coming directly from the ES cluster:Migration docs link
The text was updated successfully, but these errors were encountered: