-
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
✨ feat: add exception handling to notification server #394
Conversation
seonghun-dev
commented
Oct 30, 2023
•
edited
Loading
edited
- Resolve: Set custom exception in streetdrop-notification module #192
- Reference : Refactor ErrorCode's code by domain #137
- 인터페이스를 통해 Enum을 확장했습니다.
- 제너릭을 활용하여 특정 인터페이스를 구현한 enum만 처리하게끔 하였습니다.
- ErrorDomain Enum을 만들어서, 에러 발생 도메인을 제한하였습니다.
- Haman Readable 할 수 있는 message 외에도 title을 추가하여, 에러 내용은 title에, 상세내용과 해결방법에 대해서는 message에 작성할 수 있도록 하였습니다.
- API 서버의 경우 여기서 논의된 에러 처리방법에 따라 변경할 예정입니다.
* | ||
* This interface used to extend errorCodeEnum. | ||
*/ | ||
public interface ErrorCodeInterface { |
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.
이 인터페이스를 확장하여 ErrorEnum을 추가하시면 됩니다.
좋습니다! API 서버의 경우 에러 처리 방법 변경하면서 이참에 로깅 방법에 대해서도 한번 논의해보면 좋을 것 같아요 😄 |
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.
Good! 에러 코드에 status, domainCode, code, title, message가 들어가면서 이전보다 명확해지고 Conflict가 발생할 여지가 줄은 것 같습니다. 이대로 에러 코드를 관리해도 좋을 것 같아요! 추후에 API 서버에 변경된 에러코드를 적용할 때는 logging도 어떻게 할지 한번 논의해보아도 좋을 것 같습니당 👍
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.
고생하셨습니다 👍