jws-backend/src/interfaces/http-error.ts
2024-06-14 04:39:48 +00:00

21 lines
393 B
TypeScript

import HttpStatus from "./http-status";
class HttpError extends Error {
/**
* HTTP Status Code
*/
status: HttpStatus;
message: string;
code?: string;
constructor(status: HttpStatus, message: string, code?: string) {
super(message);
this.name = "HttpError";
this.status = status;
this.message = message;
this.code = code;
}
}
export default HttpError;