aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-01-10 16:22:01 -0800
committerBryan Newbold <bnewbold@archive.org>2020-01-10 16:22:01 -0800
commita54050c46654b0a6782abe5c0462c6f1c628ef2d (patch)
treefcd81e12cfe22475bc267e49a9820a06f0e0cb3c /python
parent566469783d6ea0e578d314232bff7d622c671241 (diff)
downloadsandcrawler-a54050c46654b0a6782abe5c0462c6f1c628ef2d.tar.gz
sandcrawler-a54050c46654b0a6782abe5c0462c6f1c628ef2d.zip
limit length of error messages
Diffstat (limited to 'python')
-rw-r--r--python/sandcrawler/ingest.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/sandcrawler/ingest.py b/python/sandcrawler/ingest.py
index f618f1b..12d1473 100644
--- a/python/sandcrawler/ingest.py
+++ b/python/sandcrawler/ingest.py
@@ -178,19 +178,19 @@ class IngestFileWorker(SandcrawlerWorker):
resource = self.find_resource(next_url, best_mimetype)
except SavePageNowError as e:
result['status'] = 'spn2-error'
- result['error_message'] = str(e)
+ result['error_message'] = str(e)[:1600]
return result
except PetaboxError as e:
result['status'] = 'petabox-error'
- result['error_message'] = str(e)
+ result['error_message'] = str(e)[:1600]
return result
except CdxApiError as e:
result['status'] = 'cdx-error'
- result['error_message'] = str(e)
+ result['error_message'] = str(e)[:1600]
return result
except WaybackError as e:
result['status'] = 'wayback-error'
- result['error_message'] = str(e)
+ result['error_message'] = str(e)[:1600]
return result
if not resource.hit: