-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Connection::httpRequest() doesn't proccess errors received in response body #136
Comments
why does it return a HTTP 200 code in case of an error? I would consider that a bug in elasticsearch. |
@cebe seems that it's ok for bulk commands. I found this discussions: Shortly, each bulk can have own errors. |
This is not a bug. As noted above, there are two cases when Elasticsearch's code 200 response is questionable. In case of partial shard failures, I would not consider it an error. After all, we do get a result. As for partial failures of batch requests, that is what they are, a batch. Every item in a batch can succeed or fail and it can fail in its own way. This should be described in the docs, hence the "docs" label. |
Reflected these considerations in the docs. |
I'm using ES 5.2 and it returns error on post request in this manner:
Should
\yii\elasticsearch\Connection::httpRequest()
interpretates it as error and throw exception? Or we should manualy parse such kind of errors?The text was updated successfully, but these errors were encountered: