Class OpenSearchException

  • All Implemented Interfaces:
    java.io.Serializable

    public class OpenSearchException
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ErrorCause error()
      The cause of the error.
      ErrorResponse response()
      The error response sent by Elasticsearch
      int status()
      Status code returned by Elasticsearch.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 for response().error().
      • status

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