Package org.opensearch.test.rest.yaml
Class ClientYamlTestResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.opensearch.test.rest.yaml.ClientYamlTestResponseException
- All Implemented Interfaces:
java.io.Serializable
public class ClientYamlTestResponseException
extends java.io.IOException
Exception obtained from a REST call in case the response code indicated an error. Eagerly reads the response body into a string
for later optional parsing. Supports parsing the response body when needed and returning specific values extracted from it.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description ClientYamlTestResponseException(org.opensearch.client.ResponseException responseException) -
Method Summary
Modifier and Type Method Description org.opensearch.client.ResponseExceptiongetResponseException()Exposes the originaResponseException.ClientYamlTestResponsegetRestTestResponse()Exposes the obtained response body
-
Constructor Details
-
ClientYamlTestResponseException
public ClientYamlTestResponseException(org.opensearch.client.ResponseException responseException) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
getRestTestResponse
Exposes the obtained response body -
getResponseException
public org.opensearch.client.ResponseException getResponseException()Exposes the originaResponseException. Note that the entity will always be null as it gets eagerly consumed and exposed throughgetRestTestResponse().
-