feat: Add express-async-errors for improved error handling

- Integrated express-async-errors to automatically handle errors in async route handlers, enhancing the overall error management in the application.
- Updated app.ts to include the express-async-errors import for global error handling.
- Removed redundant logging statements in admin and user menu retrieval functions to streamline the code and improve readability.
- Adjusted logging levels from info to debug for less critical logs, ensuring that important information is logged appropriately without cluttering the logs.
This commit is contained in:
DDD1542
2026-02-12 11:42:52 +09:00
parent 0512a3214c
commit 4294e6206b
20 changed files with 555 additions and 481 deletions

View File

@@ -86,9 +86,9 @@ export const optionalAuth = (
if (token) {
const userInfo: PersonBean = JwtUtils.verifyToken(token);
req.user = userInfo;
logger.info(`선택적 인증 성공: ${userInfo.userId} (${req.ip})`);
logger.debug(`선택적 인증 성공: ${userInfo.userId} (${req.ip})`);
} else {
logger.info(`선택적 인증: 토큰 없음 (${req.ip})`);
logger.debug(`선택적 인증: 토큰 없음 (${req.ip})`);
}
next();