@am92/kms
Version:
Key Management Service
51 lines (50 loc) • 1.17 kB
TypeScript
import { KmsErrorMap } from '../../TYPES';
/**
* Error class whose instance is thrown in case of any error.
*
* @class
* @typedef {NodeKmsError}
* @extends {Error}
*/
export declare class NodeKmsError extends Error {
/**
* Flag to identify if error is a custom error.
*/
readonly _isCustomError = true;
/**
* Flag to identify if error is a KmsError.
*/
readonly _isKmsError = true;
/**
* Flag to identify if error is a NodeKmsError.
*/
readonly _isNodeKmsError = true;
/**
* Node project from which Error is thrown.
*/
readonly service: string;
/**
* Error's message string.
*/
message: string;
/**
* HTTP status code associated with the error.
*/
statusCode: number;
/**
* Error Code.
*/
errorCode: string;
/**
* Error object.
*/
error?: any;
/**
* Creates an instance of NodeKmsError.
*
* @constructor
* @param [e] Any Error instance to wrap with NodeKmsError.
* @param [eMap] KmsErrorMap to rewrap error for better understanding.
*/
constructor(e?: any, eMap?: KmsErrorMap);
}