public class ServiceUsageException extends RuntimeException
SdkException,
ServiceApiException,
Serialized Form| Modifier 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 |
|---|
ServiceUsageException(String message)
Constructs a
ServiceUsageException with the specified detail message. |
ServiceUsageException(String message,
String requestTrackingId,
int statusCode)
Constructs a
ServiceUsageException with the specified detail message, requestId and returned HTTP status code. |
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage()
Returns the detailed message for 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, toStringpublic final int DEFAULT_STATUS_CODE
public ServiceUsageException(String message)
ServiceUsageException with the specified detail message.message - the detail messagepublic ServiceUsageException(String message, String requestTrackingId, int statusCode)
ServiceUsageException 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 String getMessage()
getMessage in class Throwablepublic String getRequestTrackingId()
public 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.Copyright © 2020 Adobe. All rights reserved.