UNPKG

@adobe/pdfservices-node-sdk

Version:

The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.

56 lines (55 loc) 2.08 kB
/** * ServiceUsageError is thrown when either Service usage limit has been reached or credentials quota has been * exhausted. * * @see {@link SDKError} * @see {@link ServiceApiError} */ export declare class ServiceUsageError 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 `ServiceUsageError` 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=429` if the status code doesn't adequately represent * the error. * * @returns the HTTP Status code or `DEFAULT_STATUS_CODE=429` if the status code doesn't adequately represent * the error. */ get statusCode(): number; /** * Returns the Error code or `DEFAULT_ERROR_CODE="TOO_MANY_REQUESTS"` if the error code doesn't adequately represent the error. * * @returns the Error code or `DEFAULT_ERROR_CODE="TOO_MANY_REQUESTS"` if the error code doesn't adequately represent the error. */ get errorCode(): string; }