Skip to content

Commit

Permalink
fix: 이벤트 시간 지났을때 EventClosedException을 controller에서 잡을 수 있도록 exceptio…
Browse files Browse the repository at this point in the history
…n 추가
  • Loading branch information
luna156 committed Aug 22, 2024
1 parent e79644c commit 71c0d30
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

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

0 comments on commit 71c0d30

Please sign in to comment.