Class ApiException

    • Constructor Detail

      • ApiException

        public ApiException()

        Constructor for ApiException.

      • ApiException

        public ApiException​(Throwable throwable)

        Constructor for ApiException.

        Parameters:
        throwable - a Throwable object
      • ApiException

        public ApiException​(String message)

        Constructor for ApiException.

        Parameters:
        message - the error message
      • ApiException

        public ApiException​(String message,
                            Throwable throwable,
                            int code,
                            Map<String,​List<String>> responseHeaders,
                            String responseBody)

        Constructor for ApiException.

        Parameters:
        message - the error message
        throwable - a Throwable object
        code - HTTP status code
        responseHeaders - a Map of HTTP response headers
        responseBody - the response body
      • ApiException

        public ApiException​(String message,
                            int code,
                            Map<String,​List<String>> responseHeaders,
                            String responseBody)

        Constructor for ApiException.

        Parameters:
        message - the error message
        code - HTTP status code
        responseHeaders - a Map of HTTP response headers
        responseBody - the response body
      • ApiException

        public ApiException​(String message,
                            Throwable throwable,
                            int code,
                            Map<String,​List<String>> responseHeaders)

        Constructor for ApiException.

        Parameters:
        message - the error message
        throwable - a Throwable object
        code - HTTP status code
        responseHeaders - a Map of HTTP response headers
      • ApiException

        public ApiException​(int code,
                            Map<String,​List<String>> responseHeaders,
                            String responseBody)

        Constructor for ApiException.

        Parameters:
        code - HTTP status code
        responseHeaders - a Map of HTTP response headers
        responseBody - the response body
      • ApiException

        public ApiException​(int code,
                            String message)

        Constructor for ApiException.

        Parameters:
        code - HTTP status code
        message - a String object
      • ApiException

        public ApiException​(int code,
                            String message,
                            Map<String,​List<String>> responseHeaders,
                            String responseBody)

        Constructor for ApiException.

        Parameters:
        code - HTTP status code
        message - the error message
        responseHeaders - a Map of HTTP response headers
        responseBody - the response body
    • Method Detail

      • getCode

        public int getCode()
        Get the HTTP status code.
        Returns:
        HTTP status code
      • getResponseHeaders

        public Map<String,​List<String>> getResponseHeaders()
        Get the HTTP response headers.
        Returns:
        A map of list of string
      • getResponseBody

        public String getResponseBody()
        Get the HTTP response body.
        Returns:
        Response body in the form of string
      • getMessage

        public String getMessage()
        Get the exception message including HTTP response data.
        Overrides:
        getMessage in class Throwable
        Returns:
        The exception message
      • getErrorObject

        public ProblemOrError getErrorObject()
        Get the error object.
        Returns:
        Error object
      • setErrorObject

        public void setErrorObject​(ProblemOrError errorObject)
        Get the error object.
        Parameters:
        errorObject - Error object