public class ServiceApiException extends Exception
SdkException
,
ServiceUsageException
,
Serialized FormModifier and Type | Field and Description |
---|---|
int |
DEFAULT_STATUS_CODE
the default value of status code if there is no status code for this service failure.
|
Constructor and Description |
---|
ServiceApiException(String message)
Constructs a
ServiceApiException with the specified detail message. |
ServiceApiException(String message,
String requestTrackingId,
int statusCode)
Constructs a
ServiceApiException with the specified detail message, requestId and returned HTTP status code. |
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Returns the detail message of this exception.
|
String |
getRequestTrackingId()
Returns the Request ID (the value of the X-Request-ID header).
|
int |
getStatusCode()
Returns the HTTP Status code or
DEFAULT_STATUS_CODE if the status code doesn't adequately represent the error. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public final int DEFAULT_STATUS_CODE
public ServiceApiException(String message)
ServiceApiException
with the specified detail message.message
- the detail messagepublic ServiceApiException(String message, String requestTrackingId, int statusCode)
ServiceApiException
with the specified detail message, requestId and returned HTTP status code.message
- the detail messagerequestTrackingId
- X-Request-Id header value to track the requeststatusCode
- HTTP Status code returned in API responsepublic int getStatusCode()
DEFAULT_STATUS_CODE
if the status code doesn't adequately represent the error.DEFAULT_STATUS_CODE
if the status code doesn't adequately represent the error.public String getMessage()
getMessage
in class Throwable
public String getRequestTrackingId()
Copyright © 2021 Adobe. All rights reserved.