Package com.wultra.core.rest.client.base
Class RestClientException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.wultra.core.rest.client.base.RestClientException
- All Implemented Interfaces:
Serializable
REST client exception.
- Author:
- Roman Strobl, roman.strobl@wultra.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRestClientException(String message) Constructor with message.RestClientException(String message, Throwable cause) Constructor with message and cause.RestClientException(String message, org.springframework.http.HttpStatusCode statusCode, String response, org.springframework.http.HttpHeaders responseHeaders) Constructor with message and HTTP status code.RestClientException(String message, org.springframework.http.HttpStatusCode statusCode, String response, org.springframework.http.HttpHeaders responseHeaders, ErrorResponse errorResponse) Constructor with message, HTTP status code, and error response. -
Method Summary
Modifier and TypeMethodDescriptionGet the error response.Get raw response.org.springframework.http.HttpHeadersGet response HTTP headers.org.springframework.http.HttpStatusCodeGet HTTP status code.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RestClientException
Constructor with message.- Parameters:
message- Exception message.
-
RestClientException
Constructor with message and cause.- Parameters:
message- Exception message.cause- Original cause.
-
RestClientException
public RestClientException(String message, org.springframework.http.HttpStatusCode statusCode, String response, org.springframework.http.HttpHeaders responseHeaders) Constructor with message and HTTP status code.- Parameters:
message- Exception message.statusCode- HTTP status code.response- Raw response.responseHeaders- Response HTTP headers.
-
RestClientException
public RestClientException(String message, org.springframework.http.HttpStatusCode statusCode, String response, org.springframework.http.HttpHeaders responseHeaders, ErrorResponse errorResponse) Constructor with message, HTTP status code, and error response.- Parameters:
message- Exception message.statusCode- HTTP status code.response- Raw response.responseHeaders- Response HTTP headers.errorResponse- Error response.
-
-
Method Details
-
getStatusCode
public org.springframework.http.HttpStatusCode getStatusCode()Get HTTP status code.- Returns:
- HTTP status code.
-
getResponse
Get raw response.- Returns:
- Raw response.
-
getResponseHeaders
public org.springframework.http.HttpHeaders getResponseHeaders()Get response HTTP headers.- Returns:
- Response HTTP headers.
-
getErrorResponse
Get the error response.- Returns:
- Error response.
-