Przeglądaj źródła

chore: 捕获并记录刷新 token 失败的错误

添加 console.error 输出刷新 token 失败的错误信息,便于调试和问题追踪
feige996 8 miesięcy temu
rodzic
commit
2fb1e63059
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      src/http/http.ts

+ 1 - 0
src/http/http.ts

@@ -62,6 +62,7 @@ export function http<T>(options: CustomRequestOptions) {
               taskQueue.forEach(task => task())
             }
             catch (refreshErr) {
+              console.error('刷新 token 失败:', refreshErr)
               refreshing = false
               // 刷新 token 失败,跳转到登录页
               nextTick(() => {