hrms-api-org/src/interfaces/http-error.ts

20 lines
339 B
TypeScript
Raw Normal View History

2024-01-24 11:39:00 +07:00
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;