Chinar Amrutkar
|
3f67581e50
|
fix: retry safe wrapped Telegram send failures (#51895) (thanks @chinar-amrutkar)
* fix(telegram): traverse error .cause chain in formatErrorMessage and match grammY HttpError
grammY wraps network failures in HttpError with message
'Network request for ... failed!' and the original error in .cause.
formatErrorMessage only checked err.message, so shouldRetry never
fired for the most common transient failure class.
Changes:
- formatErrorMessage now traverses .cause chain, appending nested
error messages (with cycle protection)
- Added 'Network request' to TELEGRAM_RETRY_RE as belt-and-suspenders
- Added tests for .cause traversal, circular references, and grammY
HttpError retry behavior
Fixes #51525
* style: fix oxfmt formatting in retry-policy.ts
* fix: add braces to satisfy oxlint requirement
* fix(telegram): keep send retries strict
* test(telegram): cover wrapped retry paths
* fix(telegram): retry rate-limited sends safely
* fix: retry safe wrapped Telegram send failures (#51895) (thanks @chinar-amrutkar)
* fix: preserve wrapped Telegram rate-limit retries (#51895) (thanks @chinar-amrutkar)
---------
Co-authored-by: chinar-amrutkar <chinar-amrutkar@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
|
2026-04-01 15:54:29 +05:30 |