Class ElasticsearchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
co.elastic.clients.elasticsearch._types.ElasticsearchException
- All Implemented Interfaces:
java.io.Serializable
public class ElasticsearchException
extends java.lang.RuntimeException
Exception thrown by API client methods when Elasticsearch could not accept or
process a request.
The error() contains the error's type and reason along with
additional details that depend on the error type and the API endpoint that
was called.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description ElasticsearchException(java.lang.String endpointId, ErrorResponse response) -
Method Summary
Modifier and Type Method Description java.lang.StringendpointId()Identifier of the API endpoint that failed to be called.ErrorCauseerror()The cause of the error.ErrorResponseresponse()The error response sent by Elasticsearchintstatus()Status code returned by Elasticsearch.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
ElasticsearchException
-
-
Method Details
-
endpointId
public java.lang.String endpointId()Identifier of the API endpoint that failed to be called. -
response
The error response sent by Elasticsearch -
error
The cause of the error. Shortcut forresponse().error(). -
status
public int status()Status code returned by Elasticsearch. Shortcut forresponse().status().
-