hermes-agent/gateway/platforms
Teknium a2847ea7f0
fix(gateway): add media download retry to Mattermost, Slack, and base cache (#3323)
* fix(gateway): add media download retry to Mattermost, Slack, and base cache

Media downloads on Mattermost and Slack fail permanently on transient
errors (timeouts, 429 rate limits, 5xx server errors). Telegram and
WhatsApp already have retry logic, but these platforms had single-attempt
downloads with hardcoded 30s timeouts.

Changes:
- base.py cache_image_from_url: add retry with exponential backoff
  (covers Signal and any platform using the shared cache helper)
- mattermost.py _send_media_url: retry on 429/5xx/timeout (3 attempts)
- slack.py _download_slack_file: retry on timeout/5xx (3 attempts)
- slack.py _download_slack_file_bytes: same retry pattern

* test: add tests for media download retry

---------

Co-authored-by: dieutx <dangtc94@gmail.com>
2026-03-26 19:33:18 -07:00
..
__init__.py Enhance CLI with multi-platform messaging integration and configuration management 2026-02-02 19:01:51 -08:00
ADDING_A_PLATFORM.md docs: finish cron terminology cleanup 2026-03-14 19:20:58 -07:00
api_server.py fix: add explicit hermes-api-server toolset for API server platform (#3304) 2026-03-26 18:02:26 -07:00
base.py fix(gateway): add media download retry to Mattermost, Slack, and base cache (#3323) 2026-03-26 19:33:18 -07:00
dingtalk.py fix(dingtalk): requirements check passes with only one credential set 2026-03-17 03:50:45 -07:00
discord.py fix: validate empty user messages to prevent Anthropic API 400 errors (#3322) 2026-03-26 19:24:03 -07:00
email.py fix(gateway): add request timeouts to HA, Email, Mattermost, SMS adapters (#3258) 2026-03-26 14:36:07 -07:00
homeassistant.py fix(gateway): add request timeouts to HA, Email, Mattermost, SMS adapters (#3258) 2026-03-26 14:36:07 -07:00
matrix.py fix(matrix): add backoff for SyncError in sync loop (#3280) 2026-03-26 16:19:58 -07:00
mattermost.py fix(gateway): add media download retry to Mattermost, Slack, and base cache (#3323) 2026-03-26 19:33:18 -07:00
signal.py fix(signal): track SSE keepalive comments as connection activity (#3316) 2026-03-26 19:10:25 -07:00
slack.py fix(gateway): add media download retry to Mattermost, Slack, and base cache (#3323) 2026-03-26 19:33:18 -07:00
sms.py fix: store asyncio task references to prevent GC mid-execution (#3267) 2026-03-26 14:36:24 -07:00
telegram.py fix(telegram): self-reschedule reconnect when start_polling fails (#3268) 2026-03-26 15:34:33 -07:00
webhook.py fix: store asyncio task references to prevent GC mid-execution (#3267) 2026-03-26 14:36:24 -07:00
whatsapp.py fix: store asyncio task references to prevent GC mid-execution (#3267) 2026-03-26 14:36:24 -07:00