增加exception检查与fallback

This commit is contained in:
UnCLAS-Prommer
2025-04-05 11:59:42 +08:00
parent 449ac12145
commit 1dc3f24cfe
2 changed files with 14 additions and 9 deletions

View File

@@ -215,9 +215,8 @@ class MessageServer(BaseMessageHandler):
try:
async with session.post(url, json=data, headers={"Content-Type": "application/json"}) as response:
return await response.json()
except Exception:
# logger.error(f"发送消息失败: {str(e)}")
pass
except Exception as e:
raise e
class BaseMessageAPI: