S3 - Add IllegalLocationConstraint validation when creating buckets

This commit is contained in:
Bert Blommers 2020-02-02 10:36:51 +00:00
commit f74f08581a
6 changed files with 182 additions and 95 deletions

View file

@ -127,6 +127,18 @@ class InvalidRequest(S3ClientError):
)
class IllegalLocationConstraintException(S3ClientError):
code = 400
def __init__(self, *args, **kwargs):
super(IllegalLocationConstraintException, self).__init__(
"IllegalLocationConstraintException",
"The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.",
*args,
**kwargs
)
class MalformedXML(S3ClientError):
code = 400