This commit is contained in:
2026-08-27 10:44:59 +08:00
parent df4b7eba8e
commit 458c8d5961
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -80,7 +80,11 @@ export async function refreshAuthenticatedSession() {
})
.catch((error) => {
if (error instanceof CrossTabRefreshTimeoutError) {
throw new ApiError(error.message, 'A0401', 401)
const expiredError = new ApiError(error.message, 'A0401', 401)
clearSessionTokens()
window.dispatchEvent(new CustomEvent('cc-client-session-expired'))
redirectToLoginAfterSessionExpiry()
throw expiredError
}
throw error
})