From c0e6e801594f5fd6962932383787661933f777ea Mon Sep 17 00:00:00 2001 From: Laura Porter Date: Tue, 10 May 2022 16:01:57 +0100 Subject: [PATCH] Don't raise ReadError or ProtocolError to Rollbar If a ReadError or ProtocolError is thrown, we want to retry ingesting the file - we don't necessarily need to know this has happend in Rollbar. We only need to raise errors in Rollbar if the maximum retries are exeeded, or if another error is thrown. This should reduce some of the noise in Rollbar for the ingester. --- ds-caselaw-ingester/lambda_function.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ds-caselaw-ingester/lambda_function.py b/ds-caselaw-ingester/lambda_function.py index 55ee611..5e38a67 100644 --- a/ds-caselaw-ingester/lambda_function.py +++ b/ds-caselaw-ingester/lambda_function.py @@ -249,8 +249,6 @@ def handler(event, context): except (urllib3.exceptions.ProtocolError, tarfile.ReadError): # Send retry message to sqs send_retry_message(message, sqs_client) - # Raise error up to ensure it's logged - raise except BaseException: raise