Skip to content

Commit

Permalink
[fix] : error 메시지 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun2371 committed Nov 20, 2024
1 parent 3501801 commit be2e6b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Arrays;

import com.dnd.gongmuin.chatroom.exception.ChatErrorCode;
import com.dnd.gongmuin.chat_inquiry.exception.ChatInquiryErrorCode;
import com.dnd.gongmuin.common.exception.runtime.ValidationException;

import lombok.Getter;
Expand All @@ -22,7 +22,7 @@ public static InquiryStatus from(String input) {
return Arrays.stream(values())
.filter(status -> status.isEqual(input))
.findAny()
.orElseThrow(() -> new ValidationException(ChatErrorCode.NOT_FOUND_CHAT_STATUS));
.orElseThrow(() -> new ValidationException(ChatInquiryErrorCode.NOT_FOUND_STATUS));
}

private boolean isEqual(String input) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public enum ChatInquiryErrorCode implements ErrorCode {

NOT_FOUND_INQUIRY("해당 아이디의 채팅 요청이 존재하지 않습니다.", "CI_001"),
UNAUTHORIZED_REQUEST("채팅 요청을 수락을 하거나 거절할 권한이 없습니다.", "CI_002"),
UNABLE_TO_CHANGE_STATUS("이미 수락했거나 거절한 요청입니다.", "CI_003");
UNABLE_TO_CHANGE_STATUS("이미 수락했거나 거절한 요청입니다.", "CI_003"),
NOT_FOUND_STATUS("채팅방 상태값을 올바르게 입력해주세요.", "CI_004");

private final String message;
private final String code;
Expand Down

0 comments on commit be2e6b0

Please sign in to comment.