Notes/src/errors/not_found_error.ts

11 lines
226 B
TypeScript

class NotFoundError extends Error {
statusCode: number;
constructor(message: string) {
super(message);
this.name = "NotFoundError";
this.statusCode = 404;
}
}
export default NotFoundError;