Skip to content

Your lightweight open-source personal agent.

fix: narrow rich capability error detection to prevent false latch

NanoBota8c65b50cad0
diff --git a/nanobot/channels/telegram.py b/nanobot/channels/telegram.py
index 18d13410f..85a0facc4 100644
--- a/nanobot/channels/telegram.py
+++ b/nanobot/channels/telegram.py
@@ -639,9 +639,8 @@ class TelegramChannel(BaseChannel):
err = str(exc).lower()
return (
"method not found" in err
- or "not found" in err
- or "bad request: invalid parameter" in err
or "unknown method" in err
+ or "bad request: invalid parameter" in err
)
async def _try_send_rich(
@@ -694,7 +693,7 @@ class TelegramChannel(BaseChannel):
err_str = str(exc).lower()
is_timeout = "timed out" in err_str or isinstance(exc, TimedOut)
if is_timeout:
- self.logger.warning("sendRichMessage timeout, not retrying legacy")
+ self.logger.debug("sendRichMessage timeout, falling back to legacy path")
return False
self.logger.debug("sendRichMessage failed: {}", exc)
return False