fix: wrap entire SD handler in try-except to prevent crashes when SD is unreachable
This commit is contained in:
@@ -394,6 +394,13 @@ async def sd_module_handler(msg: Message):
|
||||
elif msg_text.strip():
|
||||
await msg.answer(UNKNOWN_MAIN_CMD_TEXT, parse_mode="html")
|
||||
return
|
||||
except Exception as e:
|
||||
logger.exception(f"❌ [SD Fatal Error] user={getattr(msg.from_user, 'id', 'unknown')}: {e}")
|
||||
sd_workflow_logger.error(f"❌ [SD Fatal] {e}")
|
||||
try:
|
||||
await msg.answer(system_error_text(EMOJI_DIGITS), parse_mode="html")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user