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

[fix] change exception message #124

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Loading