From 015f0e31e6026190ff9c73608e5db42d1dd7682a Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Fri, 25 Sep 2020 10:03:36 -0300 Subject: Log the non-HTTP error exception For debugging. Signed-off-by: Jason Gunthorpe --- cloud_mdir_sync/gmail.py | 4 ++-- cloud_mdir_sync/office365.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cloud_mdir_sync/gmail.py b/cloud_mdir_sync/gmail.py index dee12f5..3d36e1c 100644 --- a/cloud_mdir_sync/gmail.py +++ b/cloud_mdir_sync/gmail.py @@ -57,8 +57,8 @@ def _retry_protect(func): # Other errors we retry after resetting the mailbox raise except (asyncio.TimeoutError, - aiohttp.client_exceptions.ClientError): - self.cfg.logger.debug(f"Got non-HTTP Error in {func}") + aiohttp.client_exceptions.ClientError) as e: + self.cfg.logger.debug(f"Got non-HTTP Error in {func} {e!r}") await asyncio.sleep(10) continue diff --git a/cloud_mdir_sync/office365.py b/cloud_mdir_sync/office365.py index fa130a8..7425cad 100644 --- a/cloud_mdir_sync/office365.py +++ b/cloud_mdir_sync/office365.py @@ -70,8 +70,8 @@ def _retry_protect(func): # Other errors we retry after resetting the mailbox raise except (asyncio.TimeoutError, - aiohttp.client_exceptions.ClientError): - self.cfg.logger.debug(f"Got non-HTTP Error in {func}") + aiohttp.client_exceptions.ClientError) as e: + self.cfg.logger.debug(f"Got non-HTTP Error in {func} {e!r}") await asyncio.sleep(10) continue -- cgit v1.2.3