Hi,
we are using 8.x JAVA client to communicate with Elasticsearch. In case of trying to handle unexpected error for updating aliases the documentation is saying nothing - Aliases API | Elasticsearch Guide [8.9] | Elastic.
The Java API of the client is saying for acknowledged field of co.elastic.clients.elasticsearch.indices.UpdateAliasesResponse
class, that:
Required - For a successful response, this value is always true. On failure, an exception is returned instead.
But what is it exactly? For example if I try to update alias for non existing index, the 404 is returned. The very similar behaviour for alias name. But is there another scenario when Elasticsearch can answer differently? 500 or something else, and with which payload?
I would like to write test for this scenario but I don't know how I should simulate response of Elasticsearch.
Tomas