This commit is contained in:
2026-08-13 12:22:39 +08:00
parent f12cdcaa71
commit 5fc327a14d
3 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ transport.interceptors.response.use(
(response) => response,
async (error: AxiosError) => {
const request = error.config as RetryableRequest | undefined
const publicAuthPaths = ['/auth/login', '/auth/register', '/auth/refresh']
const publicAuthPaths = ['/auth/login', '/auth/register', '/auth/refresh', '/auth/impersonations/exchange']
const isPublicAuthRequest = publicAuthPaths.some((path) => request?.url?.endsWith(path))
if (error.response?.status !== 401 || !request || request._retriedAfterRefresh || isPublicAuthRequest) {
throw mapError(error)