Class OpenSearchException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.opensearch.client.opensearch._types.OpenSearchException
All Implemented Interfaces:
Serializable

public class OpenSearchException extends RuntimeException
Exception thrown by API client methods when OpenSearch 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:
  • Constructor Details

    • OpenSearchException

      public OpenSearchException(ErrorResponse response)
  • Method Details

    • response

      public ErrorResponse response()
      The error response sent by OpenSearch
    • error

      public ErrorCause error()
      The cause of the error. Shortcut for response().error().
    • status

      public int status()
      Status code returned by OpenSearch. Shortcut for response().status().