From f1f8ef1471625984572cdbc7122589f19524d728 Mon Sep 17 00:00:00 2001 From: mikedarcy Date: Fri, 13 Oct 2023 12:36:30 -0700 Subject: [PATCH] Propagate S3 version mismatch (404: No Such Version) as ObjectVersionMissing so overlay backend can attempt to process it downstream. --- hatrac/model/storage/amazons3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hatrac/model/storage/amazons3.py b/hatrac/model/storage/amazons3.py index 3667167..bd595ce 100644 --- a/hatrac/model/storage/amazons3.py +++ b/hatrac/model/storage/amazons3.py @@ -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)