Skip to content
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

[Resolves #7] 예외 처리 구현 #9

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

JeongA-Shin
Copy link
Contributor

#7

작업 목록

예외 처리 구현
  • 각 예외들 enum으로 쉽게 관리할 수 있도록 구현
  • 예외 처리 관련 respose 객체 구현

논의 사항

  • 딱히 없습니당. 혹시 있으시면 코멘트 부탁해용 😉

binimini and others added 6 commits October 27, 2022 17:24
- 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 <[email protected]>
@JeongA-Shin JeongA-Shin requested a review from binimini November 8, 2022 14:21
@binimini binimini assigned JeongA-Shin and unassigned binimini Nov 8, 2022
@binimini binimini added the feature new feature label Nov 11, 2022
Copy link
Contributor

@binimini binimini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고했습니당~! 리뷰 확인해주세용~

Comment on lines +10 to +11
private final String message;
private final HttpStatus status;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

중복 필드 삭제해야할것 같습니당~

Comment on lines +30 to +31
protected ResponseEntity<ErrorResponse> handleNotBlankValid(MethodArgumentNotValidException e){
log.error("NotValid!", e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

메서드 이름만 바꿔주세용~

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;
}

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

빌더랑 생성자 둘 중 하나 패턴으로만 통일하는게 이후 코드가 깔끔해질듯!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants