diff --git a/src/main/java/com/dnd/gongmuin/chat_inquiry/domain/InquiryStatus.java b/src/main/java/com/dnd/gongmuin/chat_inquiry/domain/InquiryStatus.java index 4a940ad0..fb4181f2 100644 --- a/src/main/java/com/dnd/gongmuin/chat_inquiry/domain/InquiryStatus.java +++ b/src/main/java/com/dnd/gongmuin/chat_inquiry/domain/InquiryStatus.java @@ -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; @@ -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) { diff --git a/src/main/java/com/dnd/gongmuin/chat_inquiry/exception/ChatInquiryErrorCode.java b/src/main/java/com/dnd/gongmuin/chat_inquiry/exception/ChatInquiryErrorCode.java index b5e8e61d..d3d239f9 100644 --- a/src/main/java/com/dnd/gongmuin/chat_inquiry/exception/ChatInquiryErrorCode.java +++ b/src/main/java/com/dnd/gongmuin/chat_inquiry/exception/ChatInquiryErrorCode.java @@ -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;