feat: global exception 수정

This commit is contained in:
박정민 2024-07-31 11:07:11 +09:00
parent a98e2c73eb
commit 62dde35a66
2 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
@ControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(UnAuthorizedException.class)
public ResponseEntity<String> handleUnAuthorizedException(UnAuthorizedException e) {
@ExceptionHandler(InvalidTokenException.class)
public ResponseEntity<String> handleUnAuthorizedException(InvalidTokenException e) {

View File

@ -95,7 +95,7 @@ public class JWTUtil {
}
catch (Exception e) {
log.error("Failed to get user ID from token: {}", e.getMessage());
throw new UnAuthorizedException();
throw new InvalidTokenException();
}
}
}