IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Exceptions
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Exceptions
editClient methods can throw two kinds of exceptions:
-
Requests that were received by the Elasticsearch server but that were rejected
(validation error, server internal timeout exceeded, etc) will produce an
ElasticsearchException. This exception contains details about the error, provided by Elasticsearch. -
Requests that failed to reach the server (network error, server unavailable,
etc) will produce a
TransportException. That exception’s cause is the exception thrown by the lower-level implementation. In the case of theRestClientTransportit will be aResponseExceptionthat contains the low level HTTP response.