Skip to content

Commit

Permalink
Merge pull request #490 from woowacourse-teams/feature/#489
Browse files Browse the repository at this point in the history
feat: 토큰 예외처리 상태코드 추가 (9999)
  • Loading branch information
dladncks1217 authored Aug 17, 2023
2 parents 1308bfc + cb180b2 commit aee8d18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/api/interceptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export const handleTokenError = async (error: AxiosError<ErrorResponseData>) =>
data.code === ERROR_CODE.INVALID_REFRESH_TOKEN ||
data.code === ERROR_CODE.EXPIRED_REFRESH_TOKEN ||
data.code === ERROR_CODE.INVALID_TOKEN_VALIDATE ||
data.code === ERROR_CODE.NULL_REFRESH_TOKEN)
data.code === ERROR_CODE.NULL_REFRESH_TOKEN ||
data.code === ERROR_CODE.UNEXCEPTED_TOKEN_ERROR)
) {
localStorage.removeItem(ACCESS_TOKEN_KEY);

Expand Down
1 change: 1 addition & 0 deletions frontend/src/constants/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const ERROR_CODE = {
EXPIRED_ACCESS_TOKEN: 9104,
INVALID_TOKEN_VALIDATE: 9105,
NULL_REFRESH_TOKEN: 9106,
UNEXCEPTED_TOKEN_ERROR: 9999,
} as const;

export const HTTP_ERROR_MESSAGE = {
Expand Down

0 comments on commit aee8d18

Please sign in to comment.