def _get_error_message(self, resp):
        try:
            response_data = resp.json()
            message = response_data['title']
            description = response_data.get('description')
            if description:
                message = '{0}: {1}'.format(message, description)
        except __HOLE__:
            message = resp.content
        return message
dataset/ETHPy150Open openstack/python-barbicanclient/barbicanclient/client.py/_HTTPClient._get_error_message