AhmetArif0
21db250034
fix(wecom-callback): retry send with fresh token on errcode 40001/42001
...
When WeCom returns errcode=40001 (invalid credential) or 42001 (token
expired), send() was returning a failure without evicting the bad token
from _access_tokens. All subsequent sends then kept using the same
invalid cached token until its TTL naturally expired (~7200s).
Fix: on the first token-rejection errcode, evict the cache entry and
retry once with a freshly fetched token. Non-token errcodes fail
immediately as before. If the refreshed token also fails, the error
is returned without looping further.
Adds four regression tests covering: successful retry on 40001,
successful retry on 42001, no retry on unrelated errcode, and clean
failure when the refresh does not help.
2026-05-24 01:30:47 -07:00
..
2026-05-23 01:44:56 -07:00
2026-05-18 10:14:38 -07:00
2026-05-24 00:38:17 -07:00
2026-05-23 23:08:05 -07:00
2026-05-23 01:40:35 -07:00
2026-05-22 14:21:41 -07:00
2026-05-24 01:30:47 -07:00
2026-05-23 23:10:36 -07:00
2026-05-17 23:28:45 -07:00
2026-05-17 02:29:41 -07:00
2026-05-22 14:21:41 -07:00
2026-04-30 02:35:29 -07:00
2026-05-23 02:20:28 -07:00
2026-05-21 07:48:53 -07:00
2026-05-23 17:38:19 -07:00
2026-05-14 22:27:09 -07:00
2026-05-19 00:11:44 -07:00
2026-05-18 21:07:03 -07:00
2026-05-24 00:38:17 -07:00
2026-05-17 02:29:41 -07:00
2026-05-05 13:46:20 -07:00
2026-05-23 02:20:14 -07:00
2026-04-21 01:56:35 -07:00
2026-04-28 04:58:22 -07:00
2026-04-21 06:06:16 -07:00
2026-04-24 14:32:21 -07:00
2026-05-21 14:10:34 -07:00
2026-04-21 08:00:00 -07:00
2026-05-18 21:43:59 -07:00
2026-04-29 23:18:55 -07:00
2026-05-12 20:46:04 -07:00
2026-05-22 03:32:58 -07:00
2026-05-14 14:51:07 -07:00
2026-04-30 04:32:06 -07:00
2026-05-08 14:43:13 -07:00
2026-05-20 22:56:55 -07:00
2026-05-02 01:49:55 -07:00
2026-05-19 01:28:32 -07:00
2026-05-09 02:09:35 -07:00
2026-05-23 01:33:42 -07:00
2026-05-14 09:05:31 -07:00
2026-05-06 04:02:02 -07:00
2026-04-28 06:45:55 -07:00
2026-05-14 07:08:45 -07:00
2026-05-07 13:04:08 -07:00
2026-05-06 01:11:49 +05:30
2026-05-08 14:27:40 -07:00
2026-05-17 02:29:41 -07:00
2026-05-07 13:41:16 -07:00
2026-04-20 12:23:05 -07:00
2026-05-22 15:16:15 -07:00
2026-04-29 05:00:40 -07:00
2026-05-15 10:36:38 +05:30
2026-05-16 12:15:45 -07:00
2026-05-05 10:15:31 -07:00
2026-05-07 06:35:54 -07:00
2026-05-18 20:35:00 -07:00
2026-05-21 16:40:04 +05:30
2026-05-16 00:57:39 -07:00
2026-05-18 17:39:50 +00:00
2026-05-07 13:04:08 -07:00
2026-05-17 02:29:41 -07:00
2026-05-14 08:03:33 -07:00
2026-04-20 12:23:05 -07:00
2026-04-20 12:23:05 -07:00
2026-05-07 05:46:05 -07:00
2026-04-20 23:20:33 -07:00
2026-05-23 22:12:55 -07:00
2026-04-26 18:50:49 -07:00
2026-04-26 18:50:49 -07:00
2026-04-26 18:50:49 -07:00
2026-04-26 18:50:49 -07:00