def _extract_error_json(body):
    error_json = {}
    try:
        body_json = json.loads(body)
        if 'error_message' in body_json:
            raw_msg = body_json['error_message']
            error_json = json.loads(raw_msg)
        else:
            error_body = body_json['errors'][0]
            raw_msg = error_body['title']
            error_json = {'faultstring': error_body['title'],
                          'debuginfo': error_body['detail']}

    except ValueError:
        return {}

    return error_json
Initializes default variables
dataset/ETHPy150Open openstack/python-magnumclient/magnumclient/common/httpclient.py/_extract_error_json--crossover with--dataset/ETHPy150Open ambitioninc/django-query-builder/querybuilder/query.py/Where.__init__