Skip to content

fix(discord): handle typing indicator 429 gracefully - #29671

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-66677bb5
May 21, 2026
Merged

fix(discord): handle typing indicator 429 gracefully#29671
teknium1 merged 2 commits into
mainfrom
hermes/hermes-66677bb5

Conversation

@teknium1

@teknium1 teknium1 commented May 21, 2026

Copy link
Copy Markdown
Contributor

Salvage of #22398 by @nycomar.

Summary

Discord typing indicator loop no longer dies on rate-limit errors — extracts retry_after, sleeps the backoff, and continues.

Changes

  • gateway/platforms/discord.py: on exception in typing loop, use existing _extract_discord_retry_after() helper; if 429 → log warning + sleep + continue; otherwise → log debug + return (existing behavior).
  • Sleep interval bumped 8s → 12s to reduce endpoint pressure (typing indicator lasts ~10s).
  • scripts/release.py: AUTHOR_MAP entry for @nycomar.

Validation

tests/gateway/test_discord_send.py: 18/18 pass.

Closes #22398.

Infographic

discord-typing-429

nycomar and others added 2 commits May 20, 2026 22:56
The typing indicator loop (send_typing) ran every 8s and died on any
exception, including Discord 429 rate limits.  Once a 429 killed the
loop, the indicator never restarted — and the raw exception bounce
could cascade into broader gateway instability.

Changes:
- Bump sleep interval from 8s to 12s (typing light lasts ~10s)
- On 429: extract retry_after, log a warning, sleep the backoff,
  and continue the loop
- On non-rate-limit errors: log debug and return (unchanged
  behaviour)
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-66677bb5 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8984 on HEAD, 8984 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4741 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants