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​(org.elasticsearch.client.ResponseException responseException)  
  • Method Summary

    Modifier and Type Method Description
    org.elasticsearch.client.ResponseException getResponseException()
    Exposes the origina ResponseException.
    ClientYamlTestResponse getRestTestResponse()
    Exposes the obtained response body

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ClientYamlTestResponseException

      public ClientYamlTestResponseException​(org.elasticsearch.client.ResponseException responseException) throws java.io.IOException
      Throws:
      java.io.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().