def print_json_errors(res):
    """
    from a dimcli.Dataset object, print out an errors summary
    """
    if 'errors' in res.json.keys():
        if 'query' in res.json['errors']:
            print(res.json['errors']['query']['header'].strip('\n'))
            for key in res.json['errors']['query']['details']:
                print(key)
        else:
            print(res.json['errors'])
