Commit 7a3724f
committed
fix: handle empty 'Retry-After' header from GitLab
When requests are throttled (HTTP response code 429), python-gitlab
assumed that 'Retry-After' existed in the response headers. This is
not always the case and so the request fails due to a KeyError. The
change in this commit adds a rudimentary exponential backoff to the
'http_request' method, which defaults to 10 retries but can be set
to -1 to retry without bound.1 parent ce2c835 commit 7a3724fCopy full SHA for 7a3724f
File tree
Expand file treeCollapse file tree
2 files changed
+26
-4
lines changedOpen diff view settings
Filter options
- docs
- gitlab
Expand file treeCollapse file tree
2 files changed
+26
-4
lines changedOpen diff view settings
Collapse file
+15-1Lines changed: 15 additions & 1 deletion
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
299 | 299 | |
300 | 300 | |
301 | 301 | |
302 | | - |
| 302 | + |
| 303 | + |
| 304 | + |
303 | 305 | |
304 | 306 | |
305 | 307 | |
| ||
312 | 314 | |
313 | 315 | |
314 | 316 | |
| 317 | + |
| 318 | + |
| 319 | + |
| 320 | + |
| 321 | + |
| 322 | + |
| 323 | + |
| 324 | + |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | + |
315 | 329 | |
316 | 330 | |
317 | 331 | |
|
Collapse file
+11-3Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
477 | 477 | |
478 | 478 | |
479 | 479 | |
| 480 | + |
| 481 | + |
| 482 | + |
| 483 | + |
480 | 484 | |
481 | 485 | |
482 | 486 | |
| ||
486 | 490 | |
487 | 491 | |
488 | 492 | |
489 | | - |
490 | | - |
491 | | - |
| 493 | + |
| 494 | + |
| 495 | + |
| 496 | + |
| 497 | + |
| 498 | + |
| 499 | + |
492 | 500 | |
493 | 501 | |
494 | 502 | |
|
0 commit comments