fix: do not redirect to SSO when the error response status is 401 and API url is refresh API

This commit is contained in:
ValdiANS
2026-03-26 16:19:55 +07:00
parent ee0c47b0a1
commit 8bf5a88edb
+4 -1
View File
@@ -10,7 +10,10 @@ const axiosClient = axios.create({ baseURL: BASE_URL, timeout: 10_000 });
axiosClient.interceptors.response.use(
(response) => response,
(error: AxiosError) => {
if (error.response?.status === 401) {
if (
error.response?.status === 401 &&
error.config?.url !== '/sso/refresh'
) {
redirectToSSO();
}