Commit 4ae9505
committed
fix: retry transient HTTP errors (502/503/504/429) during session polling
The session status polling retry logic treated all requests.HTTPError as
non-retryable, causing transient errors like 502 Bad Gateway to
immediately fail the connection instead of retrying. This changes the
retry strategy to use tenacity's composable retry_if_exception predicate
to distinguish transient HTTP errors (429, 502, 503, 504) from permanent
ones (401, 403, 404), matching the industry-standard status_forcelist
from urllib3.util.Retry.1 parent 5bcf9cf commit 4ae9505
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
138 | | - | |
139 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
140 | 150 | | |
| 151 | + | |
141 | 152 | | |
142 | 153 | | |
143 | 154 | | |
| |||
0 commit comments