Class WarningFailureException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class WarningFailureException
    extends java.lang.RuntimeException
    This exception is used to indicate that one or more Response.getWarnings() exist and is typically used when the ApacheHttpClient5Transport is set to fail by passing `true` to `strictDeprecationMode`.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.opensearch.client.transport.httpclient5.Response getResponse()
      Returns the Response that caused this exception to be thrown.
      • 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

      • WarningFailureException

        public WarningFailureException​(org.opensearch.client.transport.httpclient5.Response response)
                                throws java.io.IOException
        Creates a WarningFailureException instance.
        Parameters:
        response - the response that contains warnings.
        Throws:
        java.io.IOException - if there is a problem building the exception message.
    • Method Detail

      • getResponse

        public org.opensearch.client.transport.httpclient5.Response getResponse()
        Returns the Response that caused this exception to be thrown.