From 3763a615f0ed120692a9359d7ba69673d4bfa843 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Fri, 13 Jun 2025 13:22:17 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BC=98=E5=8C=96=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/api/vision_handler.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/main/xiaozhi-server/core/api/vision_handler.py b/main/xiaozhi-server/core/api/vision_handler.py index 168440e4..55dd22a3 100644 --- a/main/xiaozhi-server/core/api/vision_handler.py +++ b/main/xiaozhi-server/core/api/vision_handler.py @@ -55,11 +55,7 @@ class VisionHandler: device_id = request.headers.get("Device-Id", "") client_id = request.headers.get("Client-Id", "") if device_id != token_device_id: - return web.Response( - text=json.dumps(self._create_error_response("设备ID与token不匹配")), - content_type="application/json", - status=401, - ) + raise ValueError("设备ID与token不匹配") # 解析multipart/form-data请求 reader = await request.multipart()