def raise_400(response):
    data = response.json()

    if "Invalid JSON format" in data['message']:
        raise InvalidJson(response.request.url,
                          json.dumps(response.request.body),
                          data['message'])
    elif "IllegalArgumentException" in data['error']:
        raise IllegalArgument()
    elif data['error'] in "VersionMismatchException":
        dpid = urllib.unquote(response.request.url.split('/')[7])
        required_version = data['message'][-3:]
        raise VersionMismatch(dpid, required_version)
    else:
        response.raise_for_status()
dataset/ETHPy150Open dave-tucker/hp-sdn-client/hpsdnclient/error.py/raise_400/swapped operands of `in`