Skip to content

Commit

Permalink
Invert error check
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-dxw committed Feb 7, 2023
1 parent b6ce02f commit 9b78ccb
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 9b78ccb

Please sign in to comment.