Skip to content

Commit

Permalink
refactor: 에러코드를 명확하게 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
seunghye218 committed Aug 1, 2024
1 parent 42a3a51 commit 3bc1c1d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

public enum ConfirmedScheduleErrorCode implements ErrorCodeType {

CONFIRMED_SCHEDULE_EXISTS(HttpStatus.BAD_REQUEST, "이미 확정된 약속입니다.");
ALREADY_EXIST_CONFIRMED_SCHEDULE(HttpStatus.BAD_REQUEST, "이미 확정된 약속입니다.");

private final HttpStatus httpStatus;
private final String message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void create(String uuid, long attendeeId, ScheduleConfirmRequest request)
validateHostPermission(attendee);

if (confirmedScheduleRepository.existsByMeeting(meeting)) {
throw new MomoException(ConfirmedScheduleErrorCode.CONFIRMED_SCHEDULE_EXISTS);
throw new MomoException(ConfirmedScheduleErrorCode.ALREADY_EXIST_CONFIRMED_SCHEDULE);
}

validateMeetingLocked(meeting);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void confirmScheduleThrowsExceptionWhen_AlreadyConfirmed() {

assertThatThrownBy(() -> confirmSchedule.create(meeting.getUuid(), attendee.getId(), request))
.isInstanceOf(MomoException.class)
.hasMessage(ConfirmedScheduleErrorCode.CONFIRMED_SCHEDULE_EXISTS.message());
.hasMessage(ConfirmedScheduleErrorCode.ALREADY_EXIST_CONFIRMED_SCHEDULE.message());
}

@DisplayName("약속애 존재하지 않는 날짜로 일정을 확정 시 예외가 발생한다.")
Expand Down

0 comments on commit 3bc1c1d

Please sign in to comment.