Class RestClientException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.wultra.core.rest.client.base.RestClientException
All Implemented Interfaces:
Serializable

public class RestClientException extends Exception
REST client exception.
Author:
Roman Strobl, roman.strobl@wultra.com
See Also:
  • Constructor Details

    • RestClientException

      public RestClientException(String message)
      Constructor with message.
      Parameters:
      message - Exception message.
    • RestClientException

      public RestClientException(String message, Throwable cause)
      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

      public String getResponse()
      Get raw response.
      Returns:
      Raw response.
    • getResponseHeaders

      public org.springframework.http.HttpHeaders getResponseHeaders()
      Get response HTTP headers.
      Returns:
      Response HTTP headers.
    • getErrorResponse

      public ErrorResponse getErrorResponse()
      Get the error response.
      Returns:
      Error response.