Class ODataResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
com.sap.cloud.sdk.datamodel.odata.client.exception.ODataException
com.sap.cloud.sdk.datamodel.odata.client.exception.ODataResponseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ODataDeserializationException
,ODataServiceErrorException
A generic
ODataException
representing an erroneous service response. This exception class comprises details
of the HTTP response.- See Also:
-
Constructor Summary
ConstructorDescriptionODataResponseException
(ODataRequestGeneric request, org.apache.http.HttpResponse httpResponse, String message, Throwable cause) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
io.vavr.control.Option<String>
The content of the HTTP response body as plain text or null, if the response did not contain a body.int
The HTTP status code of the response received.Collection<org.apache.http.Header>
The HTTP headers returned with the response.int
hashCode()
Methods inherited from class com.sap.cloud.sdk.datamodel.odata.client.exception.ODataException
getRequest
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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
- TheHttpResponse
that gave raise to this exception.message
- The error message.cause
- The error cause.
-
-
Method Details
-
equals
- Overrides:
equals
in classODataException
-
canEqual
- Overrides:
canEqual
in classODataException
-
hashCode
public int hashCode()- Overrides:
hashCode
in classODataException
-
getHttpCode
public int getHttpCode()The HTTP status code of the response received. -
getHttpHeaders
The HTTP headers returned with the response. -
getHttpBody
The content of the HTTP response body as plain text or null, if the response did not contain a body.
-