Skip to content

Commit 9af1ab8

Browse files
committed
fix: return 문 추가
1 parent 4244bc0 commit 9af1ab8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/ticket/src/lib/axios/clientAxios.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,25 @@ clientAxios.interceptors.response.use(
6565
}
6666
}
6767

68+
console.log(error.response?.data);
69+
6870
// 로그인이 필요한 요청이거나, 리프레시 토큰 모두 만료시 로그인 페이지로 이동
6971
if (isAxiosErrorResponse(error.response?.data)) {
7072
const { code } = error.response?.data ?? {};
7173

7274
// 엑세스 토큰 없음
7375
if (code === ERROR_CODE.NO_ACCESS_TOKEN || code === ERROR_CODE.REFRESH_TOKEN_EXPIRED) {
7476
redirectToLoginOnce();
77+
78+
return;
7579
}
7680

7781
if (code === ERROR_CODE.LOGIN_REQUIRED) {
7882
// 인증 페이지에서는 로그인 페이지로 이동하지 않음
7983
if (window.location.pathname !== "/auth") {
8084
redirectToLoginOnce();
85+
86+
return;
8187
}
8288
}
8389

0 commit comments

Comments
 (0)