Commit 20effb2
committed
acl-2909: retry on ECONNRESET / EPIPE / EAI_AGAIN
Expands HttpClient's retryable axios error code allowlist so transient
transport failures (TCP RST mid-flight, broken pipe, transient DNS) are
retried instead of bubbling up as hard errors on the first attempt.
Aligns deepl-node behavior with deepl-python, which retries any
requests.exceptions.ConnectionError.
Motivating incident: ritabot org saw four parallel /v2/translate calls
fail with ECONNRESET ("socket hang up") on 2026-04-18 22:51:27 UTC; the
SDK classified all four as non-retryable and surfaced them as user-
visible errors. With this change, the SDK would have retried.
The retryable-codes set is exported as @internal so the contract is
testable; ECONNREFUSED, ENOTFOUND, and CERT_HAS_EXPIRED remain non-
retryable.1 parent d54b131 commit 20effb2
3 files changed
Lines changed: 41 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
18 | 31 | | |
19 | 32 | | |
20 | 33 | | |
| |||
261 | 274 | | |
262 | 275 | | |
263 | 276 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 277 | + | |
267 | 278 | | |
268 | 279 | | |
269 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
20 | 41 | | |
21 | 42 | | |
22 | 43 | | |
| |||
0 commit comments