Class ClientYamlTestResponseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.elasticsearch.test.rest.yaml.ClientYamlTestResponseException
All Implemented Interfaces:
Serializable

public class ClientYamlTestResponseException extends 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:
  • Constructor Details

    • ClientYamlTestResponseException

      public ClientYamlTestResponseException(org.elasticsearch.client.ResponseException responseException) throws IOException
      Throws:
      IOException
  • Method Details

    • getRestTestResponse

      public ClientYamlTestResponse getRestTestResponse()
      Exposes the obtained response body
    • getResponseException

      public org.elasticsearch.client.ResponseException getResponseException()
      Exposes the origina ResponseException. Note that the entity will always be null as it gets eagerly consumed and exposed through getRestTestResponse().