Skip to content

Commit 78f85b2

Browse files
author
Matthew Fisher
committed
feat(create_bucket): raise client error if status code != 404
When a client error occurs that differs from 404 (bucket exists), we need to raise that error so the user knows what occurred.
1 parent 16d1362 commit 78f85b2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

rootfs/bin/create_bucket

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ except botocore.exceptions.ClientError as e:
2525
error_code = int(e.response['Error']['Code'])
2626
if error_code == 404:
2727
exists = False
28+
else:
29+
raise
2830

2931
if not exists:
3032
conn.create_bucket(Bucket=bucket_name)

0 commit comments

Comments
 (0)