hrms-api-kpi/src/interfaces/http-error.ts
2024-02-14 15:06:55 +07:00

19 lines
339 B
TypeScript

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