Package com.cloudera.cdp
Class CdpServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.cloudera.cdp.CdpClientException
com.cloudera.cdp.CdpHTTPException
com.cloudera.cdp.CdpServiceException
- All Implemented Interfaces:
Serializable
Class used to report well-formed errors from CDP services.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the requestId.Gets the response headers, if any.Gets the API status code.Gets the API status message.toString()
Methods inherited from class com.cloudera.cdp.CdpHTTPException
getHttpCode
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
CdpServiceException
public CdpServiceException(String requestId, int httpCode, Map<String, List<String>> responseHeaders, String statusCode, String statusMessage) Constructor.- Parameters:
requestId
- the request IDhttpCode
- the HTTP coderesponseHeaders
- the response headersstatusCode
- the status codestatusMessage
- the status message
-
-
Method Details
-
getStatusCode
Gets the API status code.- Returns:
- the API status code
-
getStatusMessage
Gets the API status message.- Returns:
- the API status message
-
getResponseHeaders
Gets the response headers, if any.- Returns:
- the response headers
-
getRequestId
Gets the requestId.- Returns:
- the requestId
-
toString
-
getMessage
- Overrides:
getMessage
in classThrowable
-