Translate a botocore.exceptions.ClientError into a dynamo3 error

def translate_exception(exc, kwargs):
    """ Translate a botocore.exceptions.ClientError into a dynamo3 error """
    error = exc.response['Error']
    error.setdefault('Message', '')
    err_class = EXC.get(error['Code'], DynamoDBError)
    return err_class(exc.response['ResponseMetadata']['HTTPStatusCode'],
                     exc_info=sys.exc_info(), args=pformat(kwargs), **error)