diff --git a/src/main/java/org/pingle/pingleserver/dto/type/ErrorMessage.java b/src/main/java/org/pingle/pingleserver/dto/type/ErrorMessage.java index cb6b602..8bc0592 100644 --- a/src/main/java/org/pingle/pingleserver/dto/type/ErrorMessage.java +++ b/src/main/java/org/pingle/pingleserver/dto/type/ErrorMessage.java @@ -39,6 +39,7 @@ public enum ErrorMessage { RESOURCE_NOT_FOUND(HttpStatus.NOT_FOUND, "해당 리소스가 존재하지 않습니다."), USER_NOT_FOUND(HttpStatus.NOT_FOUND, "사용자를 찾을 수 없습니다."), NOT_FOUND_END_POINT(HttpStatus.NOT_FOUND, "존재하지 않는 API입니다."), + MEETING_NOT_FOUND(HttpStatus.NOT_FOUND, "존재하지 않는 번개입니다"), // Method Not Allowed Error 405 METHOD_NOT_ALLOWED(HttpStatus.METHOD_NOT_ALLOWED, "지원하지 않는 메소드입니다."), // Conflict Error 409 diff --git a/src/main/java/org/pingle/pingleserver/service/UserMeetingService.java b/src/main/java/org/pingle/pingleserver/service/UserMeetingService.java index 7d37b24..e3c0667 100644 --- a/src/main/java/org/pingle/pingleserver/service/UserMeetingService.java +++ b/src/main/java/org/pingle/pingleserver/service/UserMeetingService.java @@ -44,7 +44,7 @@ public void verifyUser(Long userId, Long groupId) { @Transactional public Long participateMeeting(Long userId, Long meetingId) { - Meeting meeting = meetingRepository.findById(meetingId).orElseThrow(() -> new CustomException(ErrorMessage.RESOURCE_NOT_FOUND)); + Meeting meeting = meetingRepository.findById(meetingId).orElseThrow(() -> new CustomException(ErrorMessage.MEETING_NOT_FOUND)); if(isParticipating(userId, meeting)) throw new CustomException(ErrorMessage.RESOURCE_CONFLICT); if((getCurParticipants(meeting)) >= meeting.getMaxParticipants())