Skip to content

[FIX] 클라이언트 연결 끊김을 500 ERROR로 남기지 않도록 수정 - #206

Merged
giwoong01 merged 1 commit into
developfrom
fix/client-disconnect-logging
Nov 17, 2026
Merged

giwoong01 merged 1 commit into
developfrom
fix/client-disconnect-logging

Conversation

@giwoong01

Copy link
Copy Markdown
Collaborator

#️⃣ 연관된 이슈

남은 일 목록: 클라이언트 연결 끊김 500 로그 (#173 후속)

📝 작업 내용

문제

  • 클라이언트가 응답을 받는 도중 연결을 끊으면, 응답을 쓰다가 예외가 납니다. 브라우저 이탈이나 요청 취소, 큰 응답을 받다 끊는 경우입니다.
  • #173에서 만든 처리 못 한 예외용 핸들러가 이 예외를 받아 ERROR 처리하지 못한 예외와 전체 스택트레이스를 남기고 500을 쓰려고 했습니다.
  • 운영 로그에서 AsyncRequestNotUsableException: ... Broken pipe로 확인했습니다. 장애가 아닌데 ERROR로 쌓여서 실제 오류를 찾기 어렵게 합니다.

변경

  • 이런 예외면 DEBUG 로그 한 줄만 남기고 응답을 쓰지 않습니다. 이미 끊긴 연결이라 쓸 수도 없습니다.
  • 연결 끊김으로 보는 경우(원인 예외까지 확인):
    • AsyncRequestNotUsableException
    • Tomcat ClientAbortException
    • 메시지가 "Broken pipe" 또는 "Connection reset by peer"인 IOException
  • 그 밖의 예외는 지금처럼 ERROR와 500입니다(예: 다른 이유의 IOException).

🧪 테스트

  • ClientDisconnectHandlingTest (Logback 로그를 붙잡아 확인)
    • 연결 끊김 4가지는 응답 없음, WARN 이상 로그 없음
    • 다른 IOException은 ERROR 로그와 500
  • 수정 전 4건이 실패하는 것을 확인했습니다. 전체 테스트 통과.

🤖 Generated with Claude Code

응답 도중 클라이언트가 연결을 끊으면(AsyncRequestNotUsableException, ClientAbortException, Broken pipe·Connection reset)
catch-all이 ERROR 로그와 500을 남겼다. 연결 끊김은 DEBUG 한 줄만 남기고 응답을 쓰지 않는다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@giwoong01 giwoong01 added the 🐞 bug 기능이 의도대로 동작하지 않는 문제 label Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9eefa38 and 4a8a4a6.

Files selected for processing: 2

  • src/main/java/backend/globber/exception/MVCGlobalException.java
  • src/test/java/backend/globber/exception/ClientDisconnectHandlingTest.java

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

Parsing warnings: 1

Validation error: Unrecognized key: "common_ground_rules"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

Test Results

374 tests   374 ✅  17s ⏱️
 74 suites    0 💤
 74 files      0 ❌

Results for commit 4a8a4a6.

@github-actions

Copy link
Copy Markdown

🌻 테스트 커버리지 리포트

Overall Project 83.06% -0.01% 🍏
Files changed 98.15% 🍏

File Coverage
MVCGlobalException.java 89.85% -0.51% 🍏

@giwoong01
giwoong01 merged commit e8ca374 into develop Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug 기능이 의도대로 동작하지 않는 문제

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant