def from_response(response):
    cls = _code_map.get(response.status_code, HTTPException)
    return cls(response.content)
Return an instance of an HTTPException based on requests response.
dataset/ETHPy150Open openstack/python-monascaclient/monascaclient/exc.py/from_response