From 674fe000f42aa8eaffea00c253bce8ebeb442637 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Mon, 6 Oct 2025 17:27:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A0=E9=99=90=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E8=AE=BF=E9=97=AE=E4=BB=A4=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 由于 Client.ts 中的 invoke 没有对请求方法做判断, 导致不该被 retry 的请求被自动重试 --- client/api/Client.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/api/Client.ts b/client/api/Client.ts index 71bdfcc..e61f1a6 100644 --- a/client/api/Client.ts +++ b/client/api/Client.ts @@ -56,7 +56,10 @@ class Client { code: -1, msg: err.message.indexOf("timed out") != -1 ? "請求超時" : err.message, }) - if (res.code == 401) { + if ([ + "User.refreshAccessToken", + "User.auth", + ].indexOf(method) == -1 && res.code == 401) { const token = await this.refreshAccessToken() if (token) { data.access_token = token