Skip to content

Commit a9f81dc

Browse files
authored
Merge pull request Next-Room#97 from Next-Room/fix/change-router
fix: 회원가입 401에러 예외처리
2 parents 3c4509b + 076e90c commit a9f81dc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/lib/reactQueryProvider.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,15 @@ apiClient.interceptors.response.use(
9090
processQueue(null, response.accessToken);
9191
return apiClient(originalRequest);
9292
} catch (refreshError) {
93-
processQueue(refreshError, null);
94-
removeLocalStorageAll();
9593
if (typeof window !== "undefined") {
96-
window.location.href = "/login";
94+
const currentPath = window.location.pathname;
95+
if (currentPath !== "/signup") {
96+
processQueue(refreshError, null);
97+
removeLocalStorageAll();
98+
window.location.href = "/login";
99+
}
97100
}
101+
98102
throw refreshError;
99103
} finally {
100104
isRefreshing = false;

0 commit comments

Comments
 (0)