diff --git a/src/main/java/mafia/mafiatogether/common/exception/GlobalExceptionHandler.java b/src/main/java/mafia/mafiatogether/common/exception/GlobalExceptionHandler.java index 9812f47..76539a5 100644 --- a/src/main/java/mafia/mafiatogether/common/exception/GlobalExceptionHandler.java +++ b/src/main/java/mafia/mafiatogether/common/exception/GlobalExceptionHandler.java @@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.servlet.NoHandlerFoundException; +import org.springframework.web.servlet.resource.NoResourceFoundException; @Slf4j @RestControllerAdvice @@ -31,7 +32,7 @@ public class GlobalExceptionHandler { private final ErrorNotificationService errorNotificationService; private static final String LOCAL_PROFILE_NAME = "local"; - @ExceptionHandler(NoHandlerFoundException.class) + @ExceptionHandler({NoHandlerFoundException.class, NoResourceFoundException.class}) public ResponseEntity handleNoHandlerFoundException() { final ErrorResponse errorResponse = ErrorResponse.create( ExceptionCode.NO_STATIC_RESOURCE.getCode(),