#1054 - DynamoDB - Improve error handling for put_item without keys
This commit is contained in:
parent
1aa99bb405
commit
6ba00d9ad1
3 changed files with 26 additions and 5 deletions
|
|
@ -293,11 +293,9 @@ class DynamoHandler(BaseResponse):
|
|||
except ItemSizeTooLarge:
|
||||
er = "com.amazonaws.dynamodb.v20111205#ValidationException"
|
||||
return self.error(er, ItemSizeTooLarge.message)
|
||||
except ValueError:
|
||||
except ValueError as ve:
|
||||
er = "com.amazonaws.dynamodb.v20111205#ConditionalCheckFailedException"
|
||||
return self.error(
|
||||
er, "A condition specified in the operation could not be evaluated."
|
||||
)
|
||||
return self.error(er, str(ve))
|
||||
|
||||
if result:
|
||||
item_dict = result.to_json()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue