|
1 | 1 | package com.nowait.applicationuser.exception; |
2 | 2 |
|
3 | 3 | import static com.nowait.common.exception.ErrorMessage.*; |
4 | | -import static org.springframework.http.HttpStatus.FORBIDDEN; |
5 | | -import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR; |
6 | | -import static org.springframework.http.HttpStatus.BAD_REQUEST; |
7 | | -import static org.springframework.http.HttpStatus.NOT_FOUND; |
| 4 | +import static org.springframework.http.HttpStatus.*; |
8 | 5 | import static org.springframework.http.HttpStatus.UNAUTHORIZED; |
9 | 6 |
|
10 | 7 | import java.util.Map; |
|
35 | 32 | import com.nowait.domaincorerdb.reservation.exception.ReservationNotFoundException; |
36 | 33 | import com.nowait.domaincorerdb.store.exception.StoreNotFoundException; |
37 | 34 | import com.nowait.domaincorerdb.store.exception.StoreWaitingDisabledException; |
| 35 | +import com.nowait.domaincorerdb.storepayment.exception.StorePaymentNotFoundException; |
38 | 36 | import com.nowait.domaincorerdb.token.exception.BusinessException; |
39 | 37 | import com.nowait.domaincorerdb.user.exception.UserNotFoundException; |
40 | 38 | import com.nowait.domainuserrdb.bookmark.exception.AlreadyDeletedBookmarkException; |
@@ -238,6 +236,14 @@ public ErrorResponse handleStoreNotFoundException(StoreNotFoundException e, WebR |
238 | 236 | return new ErrorResponse(e.getMessage(), STORE_NOT_FOUND.getCode()); |
239 | 237 | } |
240 | 238 |
|
| 239 | + @ResponseStatus(NO_CONTENT) |
| 240 | + @ExceptionHandler(StorePaymentNotFoundException.class) |
| 241 | + public ErrorResponse handleStorePaymentNotFoundException(StorePaymentNotFoundException e, WebRequest request) { |
| 242 | + alarm(e, request); |
| 243 | + log.error("handleStorePaymentNotFoundException", e); |
| 244 | + return new ErrorResponse(e.getMessage(), STORE_PAYMENT_NOT_FOUND.getCode()); |
| 245 | + } |
| 246 | + |
241 | 247 | // 공통 에러 Map 생성 |
242 | 248 | private static Map<String, String> getErrors(MethodArgumentNotValidException e) { |
243 | 249 | return e.getBindingResult() |
|
0 commit comments