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

Return an elasticsearch error response for elastic search endpoint #3280

Closed
fmassot opened this issue May 6, 2023 · 0 comments · Fixed by #3324
Closed

Return an elasticsearch error response for elastic search endpoint #3280

fmassot opened this issue May 6, 2023 · 0 comments · Fixed by #3324
Assignees
Labels
elasticsearch-api enhancement New feature or request

Comments

@fmassot
Copy link
Contributor

fmassot commented May 6, 2023

Expected JSON is:

{
   "status": 400
   "error": {
      "type": "xxx",
      "reason": "",
      "stackTrace": "",
      "causedBy": {
         "reason": ...
      },
      "rootCause": [{...}]
   }
}

For example, the Elasticsearch grafana plugin is trying to get the message by getting the information in the following order:

  • root_cause[0].reason
  • reason
  • caused_by.reason

We could start by just putting the message error in the reason field.

Java client Ref

@fmassot fmassot added enhancement New feature or request elasticsearch-api labels May 6, 2023
@fmassot fmassot self-assigned this May 6, 2023
@fmassot fmassot changed the title Return a elasticsearch error response for elastic search endpoint Return an elasticsearch error response for elastic search endpoint May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elasticsearch-api enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant