From 62e25e3ca6d9ab6ba9ef843f3a60aecd985dd345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EA=B0=95=EB=85=84?= <64246800+KangNyeonKim@users.noreply.github.com> Date: Mon, 12 Dec 2022 22:29:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=BB=A4=EC=8A=A4=ED=85=80=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=95=84=EB=8B=8C=20=EA=B2=BD=EC=9A=B0=EB=A7=8C=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/Middlewares/Error.Middleware.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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,