Skip to content

Commit

Permalink
Merge pull request #57 from nationalarchives/fix/lambda-code
Browse files Browse the repository at this point in the history
Invert error check
  • Loading branch information
dragon-dxw authored Feb 7, 2023
2 parents b6ce02f + 9b78ccb commit bdbde24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ds-caselaw-ingester/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ def handler(event, context):
try:
s3_response = http.request("GET", message["s3-folder-url"])
tar_gz_contents = s3_response.data
if s3_response.status < 400:
raise S3HTTPError(tar_gz_contents)
if s3_response.status >= 400:
raise S3HTTPError(tar_gz_contents[:250])
except Exception:
# Send retry message to sqs if the GET fails
send_retry_message(message, sqs_client)
Expand Down

0 comments on commit bdbde24

Please sign in to comment.