Skip to content

Commit

Permalink
fix: 디버깅을 위한 에러코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
junpakPark committed Sep 19, 2023
1 parent 4f57027 commit 75087f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public enum AuthErrorCode {
ILLEGAL_TOKEN("01101", "로그인에 실패하였습니다."),
FORBIDDEN_ADMIN_ACCESS("01102", "로그인에 실패하였습니다."),
BLOCKING_MEMBER_ACCESS("01103", "로그인에 실패하였습니다."),
EXPIRED_TOKEN("01104", "기간이 만료된 토큰입니다.")
EXPIRED_TOKEN("01104", "기간이 만료된 토큰입니다."),
BAD_REQUEST_TOKEN("01005", "잘못된 요청입니다.")
;

private final String code;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.mapbefine.mapbefine.auth.infrastructure;

import static com.mapbefine.mapbefine.auth.exception.AuthErrorCode.BAD_REQUEST_TOKEN;
import static com.mapbefine.mapbefine.auth.exception.AuthErrorCode.EXPIRED_TOKEN;
import static com.mapbefine.mapbefine.auth.exception.AuthErrorCode.ILLEGAL_TOKEN;

Expand Down Expand Up @@ -75,7 +76,7 @@ public void validateTokensForRemoval(String refreshToken, String accessToken) {
if (canRemoveRefreshToken) {
return;
}
throw new AuthUnauthorizedException(EXPIRED_TOKEN);
throw new AuthUnauthorizedException(BAD_REQUEST_TOKEN);
}

public void validateAccessToken(String accessToken) {
Expand Down

0 comments on commit 75087f1

Please sign in to comment.