From 653cbcb686fc34cc28f9c7889e8746e77b95371a Mon Sep 17 00:00:00 2001 From: Clay Gerrard Date: Wed, 10 Aug 2022 12:38:54 -0500 Subject: Expand retry handling on ratelimit response We have seen middlewares that return ratelimit responses as 498 or 429, so tolerate either. Closes-Bug: #1879572 Change-Id: I027222157f6c2ad7882a0508302c9de097baae4c --- swiftclient/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'swiftclient') diff --git a/swiftclient/client.py b/swiftclient/client.py index 8415db2..16bbba8 100644 --- a/swiftclient/client.py +++ b/swiftclient/client.py @@ -1833,7 +1833,7 @@ class Connection: self.http_conn = None elif 500 <= err.http_status <= 599: pass - elif self.retry_on_ratelimit and err.http_status == 498: + elif self.retry_on_ratelimit and err.http_status in (498, 429): pass else: raise -- cgit v1.2.1