Skip to content

Commit

Permalink
fix: 커스텀 에러 아닌 경우만 출력하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ekek54 committed Dec 12, 2022
1 parent 0fb50b3 commit 62e25e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/src/Middlewares/Error.Middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 62e25e3

Please sign in to comment.