-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat : 커스텀 예외 템플릿 생성 #14
Conversation
- http 상태 코드 - 에러 메세지
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예외를 커스텀해서 처리 할 일이 생기면
- CommonException 상속 받아서 현재 패키지에 넣어주고,
- ErrorCode 추가해주고,
- ExceptionHandler에서 처리
하면 되는건가요
- 기존에 구현한 공통 예외(CommonException) 클래스를 상속
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 7a12e94. ♻️ This comment has been updated with latest results. |
기존에 구현한 예외 관련 클래스들은 따로 새 패키지를 파서 안에 넣는 작업은 굳이 필요하지 않은 것 같아 하지 않았습니다. |
public enum ErrorCode { | ||
NOT_EXIST_MEMBER(HttpStatus.BAD_REQUEST, "존재하지 않는 아이디입니다."); | ||
|
||
private final HttpStatus httpStatus; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저희 httpStatus 필드 빼고, ExceptionHandler에서 처리하기로 바꿨던 것 같아요!
수고 많으셨습니다~ 깃 커밋 메세지 fix 보다는 feat이 더 적절한 것 같아요! |
고생하셨습니다~! 말씀하신대로 예외는 한 곳에 모아두고, 커스텀 예외가 너무 많아지면 그 때 가서 분류하는 것으로 하죠 ㅎㅎ |
closed #9
⛏ 작업 상세 내용
📝 작업 요약
☑️ 중점적으로 리뷰 할 부분