Teknium
41d9d08078
fix(telegram): fall back to no thread_id on 'Message thread not found' ( #3390 )
...
python-telegram-bot's BadRequest inherits from NetworkError, so the
send() retry loop was catching 'Message thread not found' as a transient
network error and retrying 3 times before silently failing. This killed
all tool progress messages, streaming responses, and typing indicators
when the incoming message carried an invalid message_thread_id.
Now detect BadRequest inside the NetworkError handler:
- 'thread not found' + thread_id set → clear thread_id and retry once
(message still reaches the chat, just without topic threading)
- Other BadRequest errors → raise immediately (permanent, don't retry)
- True NetworkError → retry as before (transient)
252 silent failures in gateway.log traced to this on 2026-03-26.
5 new tests for thread fallback, non-thread BadRequest, no-thread sends,
network retry, and multi-chunk fallback.
2026-03-27 06:07:28 -07:00
..
2026-02-26 03:20:08 +03:00
2026-03-26 13:19:43 -07:00
2026-03-26 18:23:49 -07:00
2026-03-22 04:18:18 -07:00
2026-03-26 18:02:26 -07:00
2026-03-25 09:56:20 -07:00
2026-03-18 16:58:20 -07:00
2026-03-07 11:27:50 -08:00
2026-03-26 14:33:48 -07:00
2026-03-17 03:52:15 -07:00
2026-03-11 09:15:34 +01:00
2026-03-13 21:35:07 -07:00
2026-03-13 23:59:18 -07:00
2026-03-18 04:06:08 -07:00
2026-03-14 11:03:20 -07:00
2026-03-17 03:04:58 -07:00
2026-03-09 02:20:57 -07:00
2026-03-22 07:38:14 -07:00
2026-03-15 07:59:55 -07:00
2026-03-14 09:32:05 -07:00
2026-03-13 08:52:54 -07:00
2026-03-14 14:27:21 +03:00
2026-03-14 21:44:50 -07:00
2026-03-22 04:25:19 -07:00
2026-03-23 06:50:09 -07:00
2026-03-17 02:26:34 -07:00
2026-03-27 04:03:13 -07:00
2026-02-27 11:53:46 -05:00
2026-03-14 06:31:52 -07:00
2026-03-17 01:47:34 -07:00
2026-03-26 17:40:31 -07:00
2026-03-26 14:33:48 -07:00
2026-03-13 07:40:38 -07:00
2026-03-16 00:23:47 -07:00
2026-03-05 18:39:37 -08:00
2026-03-15 03:50:45 -07:00
2026-03-17 03:18:16 -07:00
2026-03-22 05:58:26 -07:00
2026-03-26 19:33:18 -07:00
2026-02-28 03:38:27 -05:00
2026-03-11 09:15:34 +01:00
2026-03-05 18:39:37 -08:00
2026-03-16 05:58:34 -07:00
2026-03-14 21:28:51 -07:00
2026-03-14 04:02:03 -07:00
2026-03-22 23:48:24 -07:00
2026-03-22 04:56:13 -07:00
2026-03-26 13:39:41 -07:00
2026-03-16 00:23:47 -07:00
2026-03-14 21:19:22 -07:00
2026-03-10 23:34:52 -07:00
2026-03-21 16:21:06 -07:00
2026-03-22 23:48:24 -07:00
2026-03-16 05:26:31 -07:00
2026-03-27 04:03:13 -07:00
2026-03-26 17:37:10 -07:00
2026-03-15 06:57:00 -07:00
2026-03-22 15:21:18 -07:00
2026-03-26 19:27:58 -07:00
2026-03-26 14:33:48 -07:00
2026-03-22 09:33:39 -07:00
2026-03-26 19:13:07 -07:00
2026-03-22 05:58:26 -07:00
2026-03-25 15:51:15 -07:00
2026-03-17 03:14:53 -07:00
2026-03-15 23:04:34 -07:00
2026-03-17 03:44:44 -07:00
2026-03-18 03:12:59 -07:00
2026-03-01 05:28:12 -08:00
2026-03-15 21:51:40 -07:00
2026-03-27 04:03:13 -07:00
2026-03-27 04:03:13 -07:00
2026-03-27 04:03:13 -07:00
2026-03-27 04:03:13 -07:00
2026-03-27 04:03:13 -07:00
2026-03-15 03:50:45 -07:00
2026-03-27 04:03:13 -07:00
2026-03-17 02:49:57 -07:00
2026-03-27 06:07:28 -07:00
2026-03-14 14:27:20 +03:00
2026-03-04 21:34:40 +03:00
2026-03-18 04:06:08 -07:00
2026-03-14 12:15:51 -07:00
2026-03-26 14:41:04 -07:00
2026-03-21 08:08:37 -07:00
2026-03-20 06:33:36 -07:00
2026-03-20 06:33:36 -07:00
2026-03-21 09:38:52 -07:00
2026-03-17 10:44:37 -07:00