import { NodeHttpErrorMap } from './TYPES'; /** * Error class whose instance is thrown in case of any error. * * @class * @typedef {NodeHttpError} * @extends {Error} */ export declare class NodeHttpError extends Error { /** * Flag to identify if error is a custom error. */ readonly _isCustomError = true; /** * Flag to identoify if error is a NodeHttpError. */ readonly _isNodeHttpError = true; /** * Service Name from where the error was generated. */ readonly service: string; /** * API Error's message string. */ message: string; /** * API Error's HTTP status code. */ statusCode: number; /** * API Error's error code as sent by backend. */ errorCode: string; /** * API Error's error code as sent by backend. */ code?: string; /** * API Error's data object if sent with error. */ data?: any; /** * API Error's error object. */ error?: any; /** * Creates an instance of NodeHttpError. * * @constructor * @param [e] AxiosError instance or error object from response body to wrap with NodeHttpError. * @param [eMap] NodeHttpErrorMap to rewrap error for better understanding. */ constructor(e?: any, eMap?: NodeHttpErrorMap); }