aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2019-11-14 11:10:07 -0800
committerBryan Newbold <bnewbold@archive.org>2019-11-14 11:10:07 -0800
commit87f9759dd3e5e6f4e7663cf8be685fc3b8ad3400 (patch)
tree6037db7e933ed1774e026cb5f2c827ea3b94e28a
parent088593a424299d8f9797142fb77995596bb49a5a (diff)
downloadsandcrawler-87f9759dd3e5e6f4e7663cf8be685fc3b8ad3400.tar.gz
sandcrawler-87f9759dd3e5e6f4e7663cf8be685fc3b8ad3400.zip
handle WaybackError during ingest
-rw-r--r--python/sandcrawler/ingest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/sandcrawler/ingest.py b/python/sandcrawler/ingest.py
index 43aea1b..4938e12 100644
--- a/python/sandcrawler/ingest.py
+++ b/python/sandcrawler/ingest.py
@@ -116,6 +116,10 @@ class IngestFileWorker(SandcrawlerWorker):
response['status'] = 'cdx-error'
response['error_message'] = str(e)
return response
+ except WaybackError as e:
+ response['status'] = 'wayback-error'
+ response['error_message'] = str(e)
+ return response
sys.stderr.write("CDX hit: {}\n".format(cdx_dict))
response['cdx'] = cdx_dict