feat: global exception 수정
This commit is contained in:
parent
a98e2c73eb
commit
62dde35a66
@ -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) {
|
||||
|
||||
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user