From fa8ad10c00dca66506ebabb8cb19554ab6250a6f Mon Sep 17 00:00:00 2001 From: root Date: Sat, 12 Jul 2025 19:13:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/pythonCliAuth.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/services/pythonCliAuth.ts b/src/services/pythonCliAuth.ts index 9bb8037..a296731 100644 --- a/src/services/pythonCliAuth.ts +++ b/src/services/pythonCliAuth.ts @@ -187,8 +187,14 @@ class PythonCliAuth { verbose: true } }); - - return response.success; + if (!response.success) { + throw new Error(response.error || response.message || 'Command execution failed'); + } + const data = response.data; + if (data && data.success) { + return data.success; + } + throw new Error(data?.message || 'Token verification failed'); } catch (error) { console.error('Token verification failed:', error); return false;