Skip to content

Commit

Permalink
refactor: 예외 이름 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
masonkimseoul committed Oct 23, 2024
1 parent b2bd5ef commit cb3da96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public enum OfferingErrorCode implements ErrorResponse {
CANNOT_ORIGIN_PRICE_LESS_THAN_DIVIDED_PRICE(BAD_REQUEST, "원가 가격이 n빵 가격보다 작을 수 없습니다."),
CANNOT_UPDATE_LESS_THAN_CURRENT_COUNT(BAD_REQUEST, "총 인원은 참여 인원수 미만으로 수정할 수 없습니다."),
CANNOT_UPDATE_BEFORE_NOW_MEETING_DATE(BAD_REQUEST, "거래 날짜는 오늘보다 이전일 수 없습니다."),
CANNOT_MEETING_DATE_BEFORE_THAN_TOMORROW(BAD_REQUEST, "거래 날짜는 오늘부터 설정할 수 있습니다."),
CANNOT_MEETING_DATE_BEFORE_THAN_TODAY(BAD_REQUEST, "거래 날짜는 오늘부터 설정할 수 있습니다."),
;

private final HttpStatus status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void validateMeetingDate(LocalDateTime offeringMeetingDateTime) {
LocalDate thresholdDate = LocalDate.now(clock);
LocalDate targetDate = offeringMeetingDateTime.toLocalDate();
if (targetDate.isBefore(thresholdDate)) {
throw new MarketException(OfferingErrorCode.CANNOT_MEETING_DATE_BEFORE_THAN_TOMORROW);
throw new MarketException(OfferingErrorCode.CANNOT_MEETING_DATE_BEFORE_THAN_TODAY);
}
}

Expand Down

0 comments on commit cb3da96

Please sign in to comment.