From f81fee8e885bc18bb85bf92729e9cbb802db81e8 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Wed, 25 Oct 2023 22:28:54 +0800 Subject: [PATCH] :bug: Fix `Malformed request` in `BindAccountPlugin` --- plugins/account/account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/account/account.py b/plugins/account/account.py index 082f1957..a4df0931 100644 --- a/plugins/account/account.py +++ b/plugins/account/account.py @@ -152,6 +152,9 @@ class BindAccountPlugin(Plugin.Conversation): logger.warning("获取账号信息发生错误 %s 账户信息未公开", account_id) return ConversationHandler.END except SimnetBadRequest as exc: + if exc.ret_code == -10001: + await message.reply_text("账号所属服务器与选择服务器不符,请检查", reply_markup=ReplyKeyboardRemove()) + return ConversationHandler.END await message.reply_text("获取账号信息发生错误", reply_markup=ReplyKeyboardRemove()) logger.error("获取账号信息发生错误") logger.exception(exc) @@ -215,6 +218,9 @@ class BindAccountPlugin(Plugin.Conversation): if exc.ret_code == 1034: await message.reply_text("出错了呜呜呜 ~ 请稍后重试或者绑定 cookie") return ConversationHandler.END + elif exc.ret_code == -10001: + await message.reply_text("账号所属服务器与选择服务器不符,请检查", reply_markup=ReplyKeyboardRemove()) + return ConversationHandler.END await message.reply_text("获取账号信息发生错误", reply_markup=ReplyKeyboardRemove()) logger.error("获取账号信息发生错误") logger.exception(exc)