cloud-error
Version:
node micservice custome error
18 lines (17 loc) • 562 B
TypeScript
export declare class CloudError extends Error {
code: number;
msg: string;
http_status: number;
constructor(code: number, msg: string, http_status?: number);
toJSON(): {
code: number;
msg: string;
};
}
export default class E {
static INVALID_PARAM(params: string | string[]): CloudError;
static SYSTEM_ERROR(): CloudError;
static PERMISSION_DENY(params: string | string[]): CloudError;
static NEED_LOGIN(): CloudError;
static CUSTOMER_ERROR(code: number, msg: string, httpCode?: number): CloudError;
}