Description
Hi,
So based on a long-standing request from the SDK team (Simon opened the issue!) the FTS team unified the error response structure in 5.5. Since we are not performing any kind of retry right now with FTS and more or less propagate the errors to the user level there should be no impact to older code.
Going forward each error from FTS will come back in JSON with the following structure as outlined here https://docs.google.com/document/d/1p3wbANfVJWXsqyPM7s_kC-fcIppukIfejIN7f419FCk/edit#heading=h.b558h8enx6bn:
$ curl -XPOST -H "Content-Type: application/json" http://Administrator:asdasd@127.0.0.1:9200/api/index/beer/query -d '{"query": {"what" : "ever"}}' | jq
{
"error": "rest_index: Query, indexName: beer, err: bleve: QueryBleve parsing searchRequest, err: unknown query type",
"request": {
"query": {
"what": "ever"
}
},
"status": "fail"
}
So each error has a error, request and status field. Also based on my feedback the server sets the Content-Type header now correctly so going forward we can distinguish between old and new responses if we need to.
AI for each lang team: Please check if my above statements are correct or if this is impacting current behavior (other than the “raw” error msg propagated to the user).
Thanks,
Michael