From dfa6df1f50f9bb89ad27542712bfebdad9317b37 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Fri, 19 Jun 2020 11:01:39 -0300 Subject: Gmail: Retry on 502 Bad Gateway gmail occasionally returns this. Signed-off-by: Jason Gunthorpe --- cloud_mdir_sync/gmail.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud_mdir_sync/gmail.py b/cloud_mdir_sync/gmail.py index 121e3b6..d17e536 100644 --- a/cloud_mdir_sync/gmail.py +++ b/cloud_mdir_sync/gmail.py @@ -36,6 +36,7 @@ def _retry_protect(func): e.code == 400 or # Bad Request e.code == 509 or # Bandwidth Limit Exceeded e.code == 429 or # Too Many Requests + e.code == 502 or # Bad Gateway e.code == 504 or # Gateway Timeout e.code == 200): # Success, but error JSON self.cfg.logger.error(f"Gmail returns {e}, delaying") -- cgit v1.2.3