mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(teams): log reply() fallback for diagnostics
The previous bare except swallowed every exception from app.reply() silently. Log at debug so real failures (auth, chat gone) leave a trace while keeping the group-chat 400 fallback working. Also fix the Teams entry's indentation in the messaging flowchart.
This commit is contained in:
parent
2333b7a7ec
commit
601e5f1d57
2 changed files with 11 additions and 4 deletions
|
|
@ -512,7 +512,14 @@ class TeamsAdapter(BasePlatformAdapter):
|
|||
if reply_to and reply_to.isdigit() and reply_to != "0":
|
||||
try:
|
||||
result = await self._app.reply(chat_id, reply_to, chunk)
|
||||
except Exception:
|
||||
except Exception as reply_err:
|
||||
# Group chats 400 on threaded sends; the Teams SDK
|
||||
# doesn't expose typed HTTP errors, so fall back on
|
||||
# any exception and log for diagnostics.
|
||||
logger.debug(
|
||||
"Teams reply() failed, falling back to flat send: %s",
|
||||
reply_err,
|
||||
)
|
||||
result = await self._app.send(chat_id, chunk)
|
||||
else:
|
||||
result = await self._app.send(chat_id, chunk)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue