aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/sim_pipeline.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-12-06 15:51:29 -0800
committerBryan Newbold <bnewbold@archive.org>2021-12-06 16:16:37 -0800
commit5b8a58ab37d5187dcf750b498d5e91b91f0c758a (patch)
treec3218fd21fedcd75329f5f00a30f2caa750a659c /fatcat_scholar/sim_pipeline.py
parent25222cd3dcbf396c7d2a7372e32dd6e9ccae9ba4 (diff)
downloadfatcat-scholar-5b8a58ab37d5187dcf750b498d5e91b91f0c758a.tar.gz
fatcat-scholar-5b8a58ab37d5187dcf750b498d5e91b91f0c758a.zip
SIM pipeline: improve exception handling
Diffstat (limited to 'fatcat_scholar/sim_pipeline.py')
-rw-r--r--fatcat_scholar/sim_pipeline.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/fatcat_scholar/sim_pipeline.py b/fatcat_scholar/sim_pipeline.py
index e140816..34aaae3 100644
--- a/fatcat_scholar/sim_pipeline.py
+++ b/fatcat_scholar/sim_pipeline.py
@@ -213,10 +213,13 @@ class SimPipeline:
"""
try:
full_issue = self.fetch_sim_issue(issue_item, pub_collection)
- except requests.exceptions.ConnectionError as e:
- print(str(e), file=sys.stderr)
- return
- except requests.exceptions.ReadTimeout as e:
+ except (
+ requests.exceptions.ConnectionError,
+ requests.exceptions.Timeout,
+ requests.exceptions.RetryError,
+ requests.exceptions.ChunkedEncodingError,
+ urllib3.exceptions.MaxRetryError,
+ ) as e:
print(str(e), file=sys.stderr)
return
except requests.exceptions.ChunkedEncodingError as e: