diff --git a/gg-recruit-api/src/main/java/gg/recruit/api/user/service/ApplicationService.java b/gg-recruit-api/src/main/java/gg/recruit/api/user/service/ApplicationService.java index afd4c27d8..bf3fdc2ef 100644 --- a/gg-recruit-api/src/main/java/gg/recruit/api/user/service/ApplicationService.java +++ b/gg-recruit-api/src/main/java/gg/recruit/api/user/service/ApplicationService.java @@ -119,10 +119,13 @@ public ApplicationResultSvcDto findApplicationResult(FindApplicationResultParam result = ApplicationResultSvcDto.nullResult(); } else { Application application = optionalApplication.get(); - RecruitStatus recruitStatus = recruitStatusRepository.findByApplicationId(param.getApplicationId()) - .orElseThrow(IllegalStateException::new); - result = ApplicationResultSvcDto.of(application.getRecruitTitle(), - application.getStatus(), recruitStatus.getInterviewDate()); + Optional recruitStatusOptional = recruitStatusRepository.findByApplicationId( + param.getApplicationId()); + result = recruitStatusOptional.map( + recruitStatus -> ApplicationResultSvcDto.of(application.getRecruitTitle(), + application.getStatus(), recruitStatus.getInterviewDate())) + .orElseGet( + () -> ApplicationResultSvcDto.of(application.getRecruitTitle(), application.getStatus(), null)); } return result; }