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
public class CdpServiceException extends CdpHTTPException
Class used to report well-formed errors from CDP services.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMessage()
String
getRequestId()
Gets the requestId.Map<String,List<String>>
getResponseHeaders()
Gets the response headers, if any.String
getStatusCode()
Gets the API status code.String
getStatusMessage()
Gets the API status message.String
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 Detail
-
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 Detail
-
getStatusCode
public String getStatusCode()
Gets the API status code.- Returns:
- the API status code
-
getStatusMessage
public String getStatusMessage()
Gets the API status message.- Returns:
- the API status message
-
getResponseHeaders
public Map<String,List<String>> getResponseHeaders()
Gets the response headers, if any.- Returns:
- the response headers
-
getRequestId
public String getRequestId()
Gets the requestId.- Returns:
- the requestId
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
-