Betterzon/Backend/src/common/http-exception.ts

14 lines
333 B
TypeScript
Raw Normal View History

export default class HttpException extends Error {
statusCode: number;
message: string;
error: string | null;
constructor(statusCode: number, message: string, error?: string) {
super(message);
this.statusCode = statusCode;
this.message = message;
this.error = error || null;
}
}