From 32742a028b345eea44cbd292b8cb2bed9857c69f Mon Sep 17 00:00:00 2001 From: JaehongDev Date: Sat, 6 Jul 2024 22:50:05 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=A6=AC=ED=94=84=EB=A0=88?= =?UTF-8?q?=EC=8B=9C=20=ED=86=A0=ED=81=B0=20=EB=A7=8C=EB=A3=8C=EC=8B=9C=20?= =?UTF-8?q?=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89=ED=8A=B8=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/Interceptors.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/api/Interceptors.ts b/frontend/src/api/Interceptors.ts index b4553d4..dd4abf0 100644 --- a/frontend/src/api/Interceptors.ts +++ b/frontend/src/api/Interceptors.ts @@ -37,7 +37,7 @@ export const handleTokenError = async(error: AxiosError) => { const { data, status } = error.response; - if (status === 401 && data.code === 10003){ + if (status === 400 && data.code === 10003){ const { accessToken } = await reIssueToken(); originalRequest.headers.Authorization = TOKEN.bearer(accessToken); localStorage.setItem(TOKEN.ACCESS, accessToken); @@ -46,7 +46,7 @@ export const handleTokenError = async(error: AxiosError) => { } if ( - status === 401 && data.code >= 10000 + status === 400 && (data.code >= 10000 || data.code <= 10006) ) { localStorage.removeItem(TOKEN.ACCESS); window.location.href = PATH.AUTH;