Skip to content

Commit 71c0d30

Browse files
committed
fix: 이벤트 시간 지났을때 EventClosedException을 controller에서 잡을 수 있도록 exception 추가
1 parent e79644c commit 71c0d30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/main/java/com/softeer/podoarrival/event/controller/ArrivalEventController.java

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import com.softeer.podoarrival.common.response.CommonResponse;
55
import com.softeer.podoarrival.event.exception.AsyncRequestExecuteException;
6+
import com.softeer.podoarrival.event.exception.EventClosedException;
67
import com.softeer.podoarrival.event.exception.ExistingUserException;
78
import com.softeer.podoarrival.event.model.dto.ArrivalApplicationResponseDto;
89
import com.softeer.podoarrival.event.service.ArrivalEventService;
@@ -35,6 +36,8 @@ public CompletableFuture<CommonResponse<ArrivalApplicationResponseDto>> arrivalE
3536
// 내부 예외 처리
3637
if(ex.getCause() instanceof ExistingUserException) {
3738
throw new ExistingUserException("[비동기 에러] 유저가 이미 존재합니다.");
39+
} else if(ex.getCause() instanceof EventClosedException){
40+
throw new EventClosedException(ex.getMessage());
3841
} else {
3942
log.error("Exception occurred while arrival application", ex);
4043
throw new AsyncRequestExecuteException("[비동기 에러] 선착순 요청 중 서버 오류 발생");

0 commit comments

Comments
 (0)