Class OpenSearchException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.opensearch.client.opensearch._types.OpenSearchException
-
- All Implemented Interfaces:
java.io.Serializable
public class OpenSearchException extends java.lang.RuntimeExceptionException 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 OpenSearchException(ErrorResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorCauseerror()The cause of the error.ErrorResponseresponse()The error response sent by Elasticsearchintstatus()Status code returned by Elasticsearch.
-
-
-
Constructor Detail
-
OpenSearchException
public OpenSearchException(ErrorResponse response)
-
-
Method Detail
-
response
public ErrorResponse response()
The error response sent by Elasticsearch
-
error
public ErrorCause error()
The cause of the error. Shortcut forresponse().error().
-
status
public int status()
Status code returned by Elasticsearch. Shortcut forresponse().status().
-
-