Add docs for errors in GetAlias API (#51850)

Closes #31499
This commit is contained in:
Maxim 2020-02-24 19:16:05 +03:00 committed by GitHub
parent 928b11a34e
commit b706239145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 1 deletions

View file

@ -62,4 +62,24 @@ executed operation as follows:
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> Retrieves a map of indices and their aliases
<1> Retrieves a map of indices and their aliases
+{response}+ class contains information about errors if they occurred.
This info could be in fields `error` or `exception` depends on a case.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response-error]
--------------------------------------------------
<1> Client sets status to `NOT_FOUND` if at least one item of specified
indices or aliases is not found. Otherwise it is `OK`.
<2> If at least one item of specified indices isn't exist client sets
`ElasticsearchException` and returns empty result.
<3> If at least one item of specified aliases ins't exist client puts
error description in `error` field and returns partial result if any
of other patterns match.
If user specified indices or aliases as regular expressions
and nothing was found client returns `OK` status and no errors.