Package org.opensearch.client
Class ResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.opensearch.client.ResponseException
- All Implemented Interfaces:
Serializable
Exception thrown when an opensearch node responds to a request with a status code that indicates an error.
Holds the response that was returned.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResponseException(Response response) Creates a ResponseException containing the givenResponse. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ResponseException
Creates a ResponseException containing the givenResponse.- Parameters:
response- The error response.- Throws:
IOException
-
-
Method Details
-
getResponse
Returns theResponsethat caused this exception to be thrown.
-