openclaw/src/telegram/bot
Brandon Wise 01b37f1d32 fix(telegram): handle large file getFile errors gracefully
Catch GrammyError when getFile fails for files >20MB (Telegram Bot API limit).
Log warning, skip attachment, but continue processing message text.

- Add FILE_TOO_BIG_RE regex to detect 'file is too big' errors
- Add isFileTooBigError() and isRetryableGetFileError() helpers
- Skip retrying permanent 400 errors (they'll fail every time)
- Log specific warning for file size limit errors
- Return null so message text is still processed

Fixes #18518
2026-02-16 23:51:09 +01:00
..
delivery.resolve-media-retry.test.ts fix(telegram): handle large file getFile errors gracefully 2026-02-16 23:51:09 +01:00
delivery.test.ts fix(telegram): include DM topic thread id in replies (#18586) 2026-02-16 17:02:59 -05:00
delivery.ts fix(telegram): handle large file getFile errors gracefully 2026-02-16 23:51:09 +01:00
helpers.test.ts fix(telegram): include DM topic thread id in replies (#18586) 2026-02-16 17:02:59 -05:00
helpers.ts fix(telegram): include DM topic thread id in replies (#18586) 2026-02-16 17:02:59 -05:00
types.ts fix(telegram): stream replies in-place without duplicate final sends 2026-02-15 20:32:51 +05:30