From d8b178be9dfea5a37eb4f9ae7be97874a1aabe0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Fri, 13 Sep 2024 09:28:27 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EA=B0=95=EC=A0=9C=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=95=84=EC=9B=83=20=EB=A7=89=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/axiosConfig.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/api/axiosConfig.ts b/frontend/src/api/axiosConfig.ts index a7864e2..197b104 100644 --- a/frontend/src/api/axiosConfig.ts +++ b/frontend/src/api/axiosConfig.ts @@ -101,9 +101,7 @@ const handleCommonErrors = (error: AxiosError>) => { if (error.response?.status === 400) { alert('잘못된 요청입니다. 다시 시도해 주세요.'); } else if (error.response?.status === 403) { - alert('권한이 없습니다. 다시 로그인해 주세요.'); - useAuthStore.getState().clearAuth(); - window.location.href = '/'; + alert(error.response?.data?.message); } else { console.error('오류 발생:', error.response?.data?.message || '알 수 없는 오류'); }