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 HTTP error code when a suggest request failed instead of 200 #10104
Return an HTTP error code when a suggest request failed instead of 200 #10104
Conversation
I like this change, can we instead of duplicating the functionality add a static method to |
@areek I assigned this to you, can you take care of it? |
With a quick search, it seems that there are some other place that have a similar loop over failures and could also use a static method. |
cool, if you could update your PR that would be awesome! |
…led instead of 200
16227aa
to
b83036b
Compare
I updated it with the
For the record, there are also loops over failures in |
@obourgain Thanks for the the PR! This looks good to me. I will merge this in early next week |
@areek it's pretty low risk and is a bug, should we pull it for 1.5? |
@s1monw makes sense, will merge it in |
The
_suggest
API always returns 200 regardless of the call being successful or not.This PR sets the http status in a way similar to the SearchResponse https://github.com/elastic/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/search/SearchResponse.java#L71