fix(whatsapp): report libmagic dependency failures

Co-authored-by: Pratik Parmar <steveparmar6nov2011@gmail.com>
This commit is contained in:
chengyongruandPratik Parmar authored and chengyongru committed 2026-11-03 14:17:51 +08:00
1 parent 36094bcf2c
commit cc4dd1cebf
5 files changed
+200 -9

No files matched your search

+6 -1
View File
@@ -98,7 +98,12 @@ class WhatsAppConnectStore:
if session is not None:
session.qr_url = qr_data.decode("utf-8")
client, result = channel.connect_open_client(capture_qr)
from nanobot.channels.whatsapp.runtime import WhatsAppDependencyError
try:
client, result = channel.connect_open_client(capture_qr)
except WhatsAppDependencyError as exc:
raise ChannelConnectError(str(exc)) from exc
connect_task = asyncio.create_task(
self._connect(channel, client, result),
name=f"whatsapp-connect-{session_id}",