Skip to content

Commit

Permalink
feat: NoResourceFoundException 에러 핸들링 추가 (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
thdwoqor authored Nov 28, 2024
1 parent 6099ce1 commit 714a7d6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<ErrorResponse> handleNoHandlerFoundException() {
final ErrorResponse errorResponse = ErrorResponse.create(
ExceptionCode.NO_STATIC_RESOURCE.getCode(),
Expand Down

0 comments on commit 714a7d6

Please sign in to comment.