Skip to content

Commit

Permalink
Merge pull request #97 from moidot/chore/modify-token-expire-http-sta…
Browse files Browse the repository at this point in the history
…tus-code

chore: 토큰 만료 시 반환되는 HTTP 상태 코드 변경
  • Loading branch information
yujung7768903 authored Jan 10, 2024
2 parents 6095be1 + a7f926e commit a7e081d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ public CustomResponseEntity<String> securityExceptionHandler(
return CustomResponseEntity.fail("잘못된 JWT 서명입니다.");
}

@ResponseStatus(HttpStatus.BAD_REQUEST)
@ResponseStatus(HttpStatus.UNAUTHORIZED)
@ExceptionHandler(ExpiredJwtException.class)
public CustomResponseEntity<String> expiredJwtExceptionHandler(
ExpiredJwtException e, HttpServletRequest request
) {
log.error("url: \"{}\", message: {}", request.getRequestURI(), e.getMessage());

return CustomResponseEntity.fail(e.getMessage());
return CustomResponseEntity.fail("토큰이 만료되었습니다.");
}

@ResponseStatus(HttpStatus.BAD_REQUEST)
Expand Down

0 comments on commit a7e081d

Please sign in to comment.