@adobe/pdfservices-node-sdk
Version:
The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.
55 lines (54 loc) • 2.01 kB
TypeScript
/**
* ServiceApiError is thrown when an underlying service API call results in an error.
*
* @see {@link SDKError}
* @see {@link ServiceUsageError}
*/
export declare class ServiceApiError extends Error {
/**
* the default value of status code if there is no status code for this service failure.
*/
private static DEFAULT_STATUS_CODE;
/**
* the default value of error code if there is no error code for this service failure.
*/
private static DEFAULT_ERROR_CODE;
private readonly _requestTrackingId;
private readonly _statusCode;
private readonly _errorCode;
/**
* Constructs a `ServiceApiError` with the specified detail message, request tracking id, status code and
* error code.
* @param message error message detail
* @param requestTrackingId X-Request-Id header value to track the request
* @param statusCode HTTP Status code returned in API response
* @param errorCode Error code returned in API response
*/
constructor(message: string, requestTrackingId: string, statusCode?: number, errorCode?: string);
/**
* Returns the detail message of this error.
*
* @returns the message detail.
*/
get message(): string;
/**
* Returns the Request ID (the value of the X-Request-ID header).
*
* @returns Request ID
*/
get requestTrackingId(): string;
/**
* Returns the HTTP Status code or `DEFAULT_STATUS_CODE=0` if the status code doesn't adequately represent
* the error.
*
* @returns the HTTP Status code or `DEFAULT_STATUS_CODE=0` if the status code doesn't adequately represent
* the error.
*/
get statusCode(): number;
/**
* Returns the Error code or `DEFAULT_ERROR_CODE="UNKNOWN"` if the error code doesn't adequately represent the error.
*
* @returns the Error code or `DEFAULT_ERROR_CODE="UNKNOWN"` if the error code doesn't adequately represent the error.
*/
get errorCode(): string;
}