[Resolves #7] 예외 처리 구현#9
Open
JeongA-Shin wants to merge 6 commits intoKHUCapston-concoder:developfrom
Open
Conversation
- Problem - Level : Problem만 단방향으로 연관 가짐 - Problem - ProblemCategory - Category : Problem만 ProblemCategory와 양방향 연관 가짐 (카테고리별 문제 조회 필요할 경우에 Category에 연관 설정할 것) - Problem 연관 객체 Eager로 가져오도록 설정 (논의 필요)
…t/2/basic-entity [Resolves KHUCapston-concoder#2] 기본 도메인 모델 작성
…-concoder#5) * chore : add config for redis * chore: add config for redis * test: add test for redis * feat: 엔티티 작성 - Problem - Level : Problem만 단방향으로 연관 가짐 - Problem - ProblemCategory - Category : Problem만 ProblemCategory와 양방향 연관 가짐 (카테고리별 문제 조회 필요할 경우에 Category에 연관 설정할 것) - Problem 연관 객체 Eager로 가져오도록 설정 (논의 필요) * feat: Repository 작성 * refactor: 필요 없는 gitkeep 삭제 * feat: 엔티티 작성 KHUCapston-concoder#1 * refactor : 필요없는 주석 삭제 KHUCapston-concoder#6 * refactor : 콘솔 확인 삭제 KHUCapston-concoder#6 Co-authored-by: Subin Min <tnqls5417@naver.com>
binimini
requested changes
Nov 11, 2022
Comment on lines
+10
to
+11
| private final String message; | ||
| private final HttpStatus status; |
Comment on lines
+30
to
+31
| protected ResponseEntity<ErrorResponse> handleNotBlankValid(MethodArgumentNotValidException e){ | ||
| log.error("NotValid!", e); |
Comment on lines
+15
to
+35
| @Builder | ||
| public ErrorResponse(ErrorCode errorCode){ | ||
| this.status = errorCode.getStatus().value(); | ||
| this.error= errorCode.getStatus().name(); | ||
| this.code = errorCode.name(); | ||
| this.message = errorCode.getMessage(); | ||
| } | ||
|
|
||
| @Builder | ||
| public ErrorResponse(int status, String error, String code, String message) { | ||
| this.status = status; | ||
| this.error = error; | ||
| this.code = code; | ||
| this.message = message; | ||
| } | ||
|
|
||
| public ErrorResponse(String defaultMessage) { | ||
| this.message = defaultMessage; | ||
| } | ||
|
|
||
| } |
Contributor
There was a problem hiding this comment.
빌더랑 생성자 둘 중 하나 패턴으로만 통일하는게 이후 코드가 깔끔해질듯!
75eb8a7 to
d22a71b
Compare
This file contains hidden or 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
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.
#7
작업 목록
예외 처리 구현
논의 사항