-
Notifications
You must be signed in to change notification settings - Fork 0
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
✨ Seperate DomainException by response status #70
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HaiSeong
commented
Jul 23, 2024
- 커스텀 예외에 status를 추가했습니다.
- 각 요청의 예외마다 다른 status를 응답하기위해 handleDomainException 메서드에서 ResponseEntity를 리턴했습니다.
- 일관성을 위해 handleException 메서드도 ResponseEntity를 리턴하게 했습니다.
|
geoje
approved these changes
Jul 23, 2024
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.
전체적으로 커스텀 예외에 대하여 적용을 굉장히 잘 해주셨어요!
커스텀 예외 의견을 적극 어필해놓고 이제와서 이런 얘기하기 좀 그렇지만 DomainException
필드가 비슷해서 각 도메인에서 상태 코드를 결정해 주는 상황이면 그냥 Spring 5.0 에서 도입된 좋은 기본 예외 클래스 ResponseStatusException
는 어떨까 생각이 드네요...
둘 사용 사이에서 같이 고민해 보면 좋을 것 같아요! 아직 초기니깐요~
- 클라이언트 응답에 불 필요한 값이 넘어가지 않는지?
- 서버에 호출 시점이 로깅 되는지?
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.