import { CustomErrorMap } from '../TYPES'; /** * Error class whose instance is thrown in case of any error. * * @class * @typedef {CustomError} * @extends {Error} */ export declare class CustomError extends Error { /** * Flag to identify if error is a custom error. */ readonly _isCustomError = 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. * * @type {string} */ errorCode: string; /** * Error object. * * @type {*} */ error?: any; /** * Data object. * * @type {*} */ data?: any; /** * Creates an instance of CustomError. * * @constructor * @param [e] Any Error instance to wrap with CustomError. * @param [eMap] CustomErrorMap to rewrap error for better understanding. */ constructor(e?: any, eMap?: CustomErrorMap); }