From 92fa85ef8cc6a43ff98eb82909a8cc3aa55d3cd5 Mon Sep 17 00:00:00 2001 From: hh <2587203630@qq.com> Date: Wed, 15 Jul 2026 14:43:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=B8=8D=E8=B6=B3=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/api.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/frontend/src/api.ts b/core/frontend/src/api.ts index d6ced6d..f6f0e60 100644 --- a/core/frontend/src/api.ts +++ b/core/frontend/src/api.ts @@ -132,6 +132,10 @@ async function request(path: string, options: RequestInit = {}): Promise { if (response.status === 401 && AUTH_MISSING_MESSAGES.has(message)) { message = FRIENDLY_AUTH_MISSING_MESSAGE; } + // 团队接口统一用此 403 表示当前账号不具备操作资格;只翻译精确原文,避免掩盖其他 403 原因。 + if (response.status === 403 && message === "permission denied") { + message = "当前账号权限不足"; + } throw new ApiError(response.status, message); } if (response.status === 204) return undefined as T;