diff --git a/server/src/Middlewares/Error.Middleware.ts b/server/src/Middlewares/Error.Middleware.ts index b0a66a3..b67fcf5 100644 --- a/server/src/Middlewares/Error.Middleware.ts +++ b/server/src/Middlewares/Error.Middleware.ts @@ -4,7 +4,9 @@ import HttpException from "../Common/Exceptions/Http.Exception"; // eslint-disable-next-line @typescript-eslint/no-unused-vars const errorMiddleware = (err: HttpException, req: Request, res: Response, next: NextFunction) => { // render the error page - console.log(err); + if (!err.status) { + console.log(err); + } const { status, message } = err; res.status(err.status).send({ status,