def _handle_failure(self, on_failure, error):
        if on_failure is not None:
            obj = on_failure(error)
            if isinstance(obj, Exception):
                raise obj
Handles the situation where a resource failed to succeed.
dataset/ETHPy150Open s3rvac/retdec-python/retdec/resource.py/Resource._handle_failure