Skip to content

Commit

Permalink
Merge pull request #126 from TeamPINGLE/fix/125
Browse files Browse the repository at this point in the history
[fix] 번개참여 취소 에러메시지 변경
  • Loading branch information
Parkjyun authored Mar 8, 2024
2 parents 874469e + a5f30b1 commit 49ce595
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public enum ErrorMessage {
USER_NOT_FOUND(HttpStatus.NOT_FOUND, "사용자를 찾을 수 없습니다."),
NOT_FOUND_END_POINT(HttpStatus.NOT_FOUND, "존재하지 않는 API입니다."),
MEETING_NOT_FOUND(HttpStatus.NOT_FOUND, "존재하지 않는 번개입니다"),
USERMEETING_NOT_FOUND(HttpStatus.NOT_FOUND, "존재하지 않는 유저미팅입니다." ),
// Method Not Allowed Error 405
METHOD_NOT_ALLOWED(HttpStatus.METHOD_NOT_ALLOWED, "지원하지 않는 메소드입니다."),
// Conflict Error 409
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Long participateMeeting(Long userId, Long meetingId) {
@Transactional
public Long cancelMeeting(Long userId, Long meetingId) {
UserMeeting userMeeting = userMeetingRepository.findByUserIdAndMeetingId(userId, meetingId)
.orElseThrow(() -> new CustomException(ErrorMessage.RESOURCE_NOT_FOUND));
.orElseThrow(() -> new CustomException(ErrorMessage.USERMEETING_NOT_FOUND));
if(userMeetingRepository.existsByUserIdAndMeetingIdAndMeetingRole(userId, meetingId, MRole.OWNER))
throw new CustomException(ErrorMessage.BAD_REQUEST);
userMeetingRepository.delete(userMeeting);
Expand Down

0 comments on commit 49ce595

Please sign in to comment.