Skip to content

Commit

Permalink
Feat: 500번대 에러 발생 제거 #165
Browse files Browse the repository at this point in the history
  • Loading branch information
mzeong committed Feb 19, 2024
1 parent 3b2d045 commit 7666acb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ app.use((err, req: Request, res: Response, next: NextFunction) => {
res.locals.message = err.message;
res.locals.err = process.env.NODE_ENV !== "production" ? err : {};
const error = err instanceof BaseError ? err : new BaseError(status.INTERNAL_SERVER_ERROR);
res.status(error.data.status).send(response(error.data));
// res.status(error.data.status).send(response(error.data));
res.send(err);
});

app.listen(app.get("port"), () => {
Expand Down

0 comments on commit 7666acb

Please sign in to comment.