Package org.elasticsearch.test.rest.yaml
Class ClientYamlTestResponseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.elasticsearch.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(ResponseException responseException)
-
Method Summary
Modifier and Type Method Description ResponseException
getResponseException()
Exposes the originaResponseException
.ClientYamlTestResponse
getRestTestResponse()
Exposes the obtained response body
-
-
-
Constructor Detail
-
ClientYamlTestResponseException
public ClientYamlTestResponseException(ResponseException responseException) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getRestTestResponse
public ClientYamlTestResponse getRestTestResponse()
Exposes the obtained response body
-
getResponseException
public ResponseException getResponseException()
Exposes the originaResponseException
. Note that the entity will always be null as it gets eagerly consumed and exposed throughgetRestTestResponse()
.
-
-