def handle_errors(self, response):
        if not response.ok:
            try:
                res = response.json()
            except __HOLE__:
                response.raise_for_status()
            raise MonkeyLearnException(json.dumps(res['detail']))
dataset/ETHPy150Open monkeylearn/monkeylearn-python/monkeylearn/utils.py/HandleErrorsMixin.handle_errors