go-telegram/bot v1.22.0 get_updates.go discards TooManyRequestsError.RetryAfter and applies its own 100ms-doubling backoff capped at 5s. Against retry_after:5 that is ~12 further requests inside the silence window, which escalated a brief 429 on carina into sustained 429s, 502s and request timeouts over several minutes.
Fixed in internal/channels/telegram/ratelimit.go: WithErrorsHandler is invoked synchronously from the polling loop before the library applies its own backoff, so blocking there honours the interval without patching the dependency. errors.As unwraps the library's fmt.Errorf wrap; capped at maxRetryAfter=60s; releases immediately on context cancellation so /restart during a 429 does not block.
Imported from beads archie-core-1786637489959-7-6c8cdec2 · GitHub #28 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08
go-telegram/bot v1.22.0 get_updates.go discards TooManyRequestsError.RetryAfter and applies its own 100ms-doubling backoff capped at 5s. Against retry_after:5 that is ~12 further requests inside the silence window, which escalated a brief 429 on carina into sustained 429s, 502s and request timeouts over several minutes.
Fixed in internal/channels/telegram/ratelimit.go: WithErrorsHandler is invoked synchronously from the polling loop before the library applies its own backoff, so blocking there honours the interval without patching the dependency. errors.As unwraps the library's fmt.Errorf wrap; capped at maxRetryAfter=60s; releases immediately on context cancellation so /restart during a 429 does not block.
Upstream report drafted for https://github.com/go-telegram/bot/issues -- suggested fix is to prefer RetryAfter over incErrTimeout in the error branch.
---
_Imported from beads `archie-core-1786637489959-7-6c8cdec2` · GitHub #28 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam
added the mediumtask labels 2026-10-27 13:36:43 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
go-telegram/bot v1.22.0 get_updates.go discards TooManyRequestsError.RetryAfter and applies its own 100ms-doubling backoff capped at 5s. Against retry_after:5 that is ~12 further requests inside the silence window, which escalated a brief 429 on carina into sustained 429s, 502s and request timeouts over several minutes.
Fixed in internal/channels/telegram/ratelimit.go: WithErrorsHandler is invoked synchronously from the polling loop before the library applies its own backoff, so blocking there honours the interval without patching the dependency. errors.As unwraps the library's fmt.Errorf wrap; capped at maxRetryAfter=60s; releases immediately on context cancellation so /restart during a 429 does not block.
Upstream report drafted for https://github.com/go-telegram/bot/issues -- suggested fix is to prefer RetryAfter over incErrTimeout in the error branch.
Imported from beads
archie-core-1786637489959-7-6c8cdec2· GitHub #28 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08