Skip to content

Commit

Permalink
fix: ErrorType 충돌 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
toychip committed Jan 24, 2024
1 parent dc645aa commit ec702dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ProblemService {

public ProblemDto getProblemById(String id) {
BojProblem bojProblem = problemRepository.findById(id)
.orElseThrow(() -> new ApiException(ErrorType._PROBLEM_NOT_FOUND));
.orElseThrow(() -> new ApiException(ErrorType._COMPILE_PROBLEM_NOT_FOUND));

return ProblemConverter.convertToDto(bojProblem).orElseThrow(() -> new ApiException(ErrorType._PROBLEM_CONVERSION_ERROR));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ public enum ErrorType {
// ---------------------------------------- problem ---------------------------------------------------

_PROBLEM_NOT_FOUND(BAD_REQUEST, "PROBLEM_4001", "존재하지 않는 문제입니다."),

// ------------------------------------------ Compile ------------------------------------------
_PROBLEM_NOT_FOUND(NOT_FOUND, "PROBLEM_4040", "요청한 문제 번호를 찾을 수 없습니다."),
_COMPILE_PROBLEM_NOT_FOUND(NOT_FOUND, "PROBLEM_4040", "요청한 문제 번호를 찾을 수 없습니다."),
_SUBMIT_PAGE_NOT_FOUND(NOT_FOUND, "COMPILE_4040", "아직 정답이 준비 되지 않아 코드를 제출할 수 없습니다."),
_PROBLEM_CONVERSION_ERROR(INTERNAL_SERVER_ERROR, "PROBLEM_5002", "문제 정보 변환 중 오류가 발생했습니다.")

Expand Down

0 comments on commit ec702dc

Please sign in to comment.