improve
This commit is contained in:
@@ -646,14 +646,15 @@ class DynamoDBPersistenceLayer:
|
||||
)
|
||||
except ClientError as err:
|
||||
error_msg = glom(err, 'response.Error.Message', default='')
|
||||
cancellation_reasons = err.response.get('CancellationReasons', [])
|
||||
cancellations = err.response.get('CancellationReasons', [])
|
||||
reasons = []
|
||||
|
||||
for idx, reason in enumerate(cancellation_reasons):
|
||||
if reason.get('Code') == 'None':
|
||||
for idx, reason in enumerate(cancellations):
|
||||
if 'Message' not in reason:
|
||||
continue
|
||||
|
||||
item = transact_items.items[idx]
|
||||
|
||||
if item.exc_cls:
|
||||
raise item.exc_cls(error_msg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user