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

fix: handle errors in multisearch response #2965

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

cdmbr
Copy link
Contributor

@cdmbr cdmbr commented Nov 29, 2023

bug: multisearch response with a non 2XX status is handled as successful response (MultiSearchResponse(Nil))

sample request:

GET /_msearch
{}
{"query" : {"exists" : { "field": ""}}}
{}
{"query" : {"exists" : { "field": "ok"}}}
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "field name is null or empty"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "field name is null or empty"
  },
  "status": 400
}

@cdmbr
Copy link
Contributor Author

cdmbr commented Nov 29, 2023

fyi @sksamuel

@cdmbr cdmbr force-pushed the fix/multisearch-handler branch from 79175bc to 03f5ec8 Compare November 29, 2023 23:38
@cdmbr cdmbr changed the title fix: handle errors in multisearch responses fix: handle errors in multisearch response Nov 29, 2023
@sksamuel
Copy link
Collaborator

lgtm

@sksamuel sksamuel merged commit 8902a81 into Philippus:master Nov 30, 2023
3 checks passed
@cdmbr cdmbr deleted the fix/multisearch-handler branch November 30, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants