Skip to content

Commit

Permalink
Propagate S3 version mismatch (404: No Such Version) as ObjectVersion…
Browse files Browse the repository at this point in the history
…Missing so overlay backend can attempt to process it downstream.
  • Loading branch information
mikedarcy committed Oct 13, 2023
1 parent ddb18e2 commit f1f8ef1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hatrac/model/storage/amazons3.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ def get_content_range(self, name, version, metadata={},
except bucket_config.client.exceptions.NoSuchKey as e:
raise ObjectVersionMissing(e)
except ClientError as e:
if e.response['Error']['Code'] == 'NoSuchVersion':
raise ObjectVersionMissing(e)
if e.response['Error']['Code'] == 'InvalidArgument' \
and e.response['Error']['ArgumentName'] == 'versionId':
raise ObjectVersionMissing(e)
Expand Down

0 comments on commit f1f8ef1

Please sign in to comment.