refactor: WebSocket 공용 모듈 분리 및 ChatGateway 역할 축소#164
Conversation
…kend into feat/block-sending-message
…ock-sending-message
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 532a7f1f1b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } catch { | ||
| return null; |
There was a problem hiding this comment.
Preserve WebSocket auth failures in logs
attachUser() now swallows every verification/DB exception with catch { return null; }, so handleConnection() can only log a generic auth failure and operators lose the real failure cause (e.g., DB outage, bad JWT secret, Prisma error). This is a regression from the previous flow where these exceptions were logged, and it makes production incidents much harder to diagnose.
Useful? React with 👍 / 👎.
| } else if (exception instanceof Error) { | ||
| if (process.env.NODE_ENV !== 'production' && exception.message) { | ||
| message = exception.message; | ||
| } |
There was a problem hiding this comment.
Log unexpected errors in WebSocket exception filter
The new gateway-wide WsExceptionFilter catches all handler errors and emits an exception event, but it never logs unexpected server-side exceptions. Because this replaces Nest's default WS exception handling for this gateway, runtime bugs can become silent on the server (client only receives a generic SYS-001), which materially hurts observability and incident response.
Useful? React with 👍 / 👎.
이슈 번호
close #163
주요 변경사항
테스트 결과 (스크린샷)
로컬 웹소켓 정상 동작 확인

참고 및 개선사항