🐛 Fix recognize error return

This commit is contained in:
xtaodada 2024-11-07 11:32:28 +08:00
parent b41bdbb24e
commit 22ee6cbf57
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -44,6 +44,7 @@ class RecognizeSystem:
data = resp.json()
if data.get("code", 0) != 0:
logger.error("recognize 解析错误:[%s]%s", data.get("code"), data.get("msg"))
return None
logger.info("recognize 解析成功")
return data["data"]["validate"]
except JSONDecodeError: