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

[feature/#209] 정책 관련 API 구현 #210

Merged
merged 6 commits into from
Jan 8, 2024

Conversation

whitem4rk
Copy link
Contributor

No description provided.

@whitem4rk
Copy link
Contributor Author

Github workflow가 PR을 생성한 시기의 코드에서만 동작해서 코드를 올바르게 수정해도 계속 fail로 판단함

//then
Assertions.assertThatThrownBy(() -> new PolicyTerm(policyType, nullString))
.isInstanceOf(InvalidInputException.class)
.hasMessage("입력값이 없거나, 타입이 유효하지 않습니다.");
Copy link
Member

Choose a reason for hiding this comment

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

혹시 이 테스트 성공했는지 궁금합니다. InvalidInputException.class 가 생겼을 때 한국어로 "입력값이 없거나, 타입이 유효하지 않습니다" 라고 나오나요?
왜냐하면 보통 기본 오류들은 영어로 나오는거로 알고 있어서요!

Copy link
Member

Choose a reason for hiding this comment

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

이 테스트 실행해서 통과한거면 상관은 없습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ExceptionHandler(InvalidInputException.class)
    protected ResponseEntity<ErrorResponse> handleInvalidInputException(InvalidInputException e) {
        log.error("Invalid input value");
        final ErrorResponse response = ErrorResponse.of(INVALID_INPUT_VALUE);
        return new ResponseEntity<>(response, BAD_REQUEST);
    }

errorhandler로 저렇게 동작하도록 했어. ExceptionController 관련 코드 참고

Copy link
Member

Choose a reason for hiding this comment

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

@whitem4rk 확인했습니다. 감사합니다!

@skytin1004
Copy link
Member

@whitem4rk 검토 결과 문제되는 부분은 없었습니다. 감사합니다.

@skytin1004
Copy link
Member

@whitem4rk 검토 결과 문제되는 부분은 없었습니다. 감사합니다.

테스트 코드 관련 리뷰 답장 확인하면 바로 머지 하겠습니다!

@skytin1004 skytin1004 merged commit d06b3f9 into InhaBas:master Jan 8, 2024
0 of 2 checks passed
@whitem4rk whitem4rk deleted the feature/#209 branch June 2, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants