Class ODataResponseException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ODataDeserializationException, ODataServiceErrorException

public class ODataResponseException extends ODataException
A generic ODataException representing an erroneous service response. This exception class comprises details of the HTTP response.
See Also:
  • Constructor Details

    • ODataResponseException

      public ODataResponseException(@Nonnull ODataRequestGeneric request, @Nonnull org.apache.http.HttpResponse httpResponse, @Nonnull String message, @Nullable Throwable cause)
      Default constructor.
      Parameters:
      request - The original OData request reference.
      httpResponse - The HttpResponse that gave raise to this exception.
      message - The error message.
      cause - The error cause.
  • Method Details

    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class ODataException
    • canEqual

      protected boolean canEqual(@Nullable Object other)
      Overrides:
      canEqual in class ODataException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ODataException
    • getHttpCode

      public int getHttpCode()
      The HTTP status code of the response received.
    • getHttpHeaders

      @Nonnull public Collection<org.apache.http.Header> getHttpHeaders()
      The HTTP headers returned with the response.
    • getHttpBody

      @Nonnull public io.vavr.control.Option<String> getHttpBody()
      The content of the HTTP response body as plain text or null, if the response did not contain a body.