mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 18:33:37 +00:00
* fix(telegram): improve error messages for 403 bot not member errors - Detect 403 'bot is not a member' errors specifically - Provide actionable guidance for users to fix the issue - Fixes #48273 where outbound sendMessage fails with 403 Root cause: When a Telegram bot tries to send a message to a channel/group it's not a member of, the API returns 403 'bot is not a member of the channel chat'. The error message was not clear about how to fix this. Fix: 1. Detect 403 errors in wrapTelegramChatNotFoundError 2. Provide clear error message explaining the issue 3. Suggest adding the bot to the channel/group * fix(telegram): fix regex precedence for 403 error detection - Group alternatives correctly: /403.*(bot.*not.*member|bot was blocked)/i - Require 403 for both alternatives (previously bot.*blocked matched any error) - Update error message to cover both scenarios - Fixes Greptile review feedback * fix(telegram): correct regex alternation precedence for 403 errors - Fix: /403.*(bot.*not.*member|bot was blocked)/ → /403.*(bot.*not.*member|bot.*blocked)/ - Ensures 403 requirement applies to both alternatives - Fixes Greptile review comment on PR #48650 * fix(telegram): add 'bot was kicked' to 403 error regex and message * fix(telegram): preserve membership delivery errors * fix: improve Telegram 403 membership delivery errors (#53635) (thanks @w-sss) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>