diff --git a/Common-Module/src/main/java/com/pawith/commonmodule/exception/GlobalExceptionHandler.java b/Common-Module/src/main/java/com/pawith/commonmodule/exception/GlobalExceptionHandler.java index bc9916c9..4439cd63 100644 --- a/Common-Module/src/main/java/com/pawith/commonmodule/exception/GlobalExceptionHandler.java +++ b/Common-Module/src/main/java/com/pawith/commonmodule/exception/GlobalExceptionHandler.java @@ -1,6 +1,5 @@ package com.pawith.commonmodule.exception; -import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; @@ -11,6 +10,6 @@ public class GlobalExceptionHandler { @ExceptionHandler(BusinessException.class) public ResponseEntity handleJwtException(BusinessException e) { final ErrorResponse errorResponse = ErrorResponse.from(e); - return new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST); + return new ResponseEntity<>(errorResponse, e.getHttpStatusCode()); } }