Add check for Errors while deleting objects
This commit is contained in:
parent
e86ed765b1
commit
532d58abc7
1 changed files with 3 additions and 0 deletions
|
@ -168,6 +168,9 @@ def delete_objects_s3(s3_client, bucket: str, object_keys: list):
|
|||
response = s3_client.delete_objects(Bucket=bucket, Delete=_make_objs_dict(object_keys))
|
||||
log_command_execution("S3 Delete objects result", response)
|
||||
sleep(S3_SYNC_WAIT_TIME)
|
||||
assert (
|
||||
"Errors" not in response
|
||||
), f'The following objects have not been deleted: {[err_info["Key"] for err_info in response["Errors"]]}.\nError Message: {response["Errors"]["Message"]}'
|
||||
return response
|
||||
|
||||
except ClientError as err:
|
||||
|
|
Loading…
Reference in a new issue