Package org.opensearch.client
Class WarningFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.opensearch.client.WarningFailureException
- All Implemented Interfaces:
Serializable
This exception is used to indicate that one or more
Response.getWarnings() exist
and is typically used when the RestClient is set to fail by setting
RestClientBuilder.setStrictDeprecationMode(boolean) to `true`.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWarningFailureException(Response response) Creates aWarningFailureExceptioninstance. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WarningFailureException
Creates aWarningFailureExceptioninstance.- Parameters:
response- the response that contains warnings.- Throws:
IOException- if there is a problem building the exception message.
-
-
Method Details
-
getResponse
Returns theResponsethat caused this exception to be thrown.
-