def METHOD_NAME(self, task):
    self.logger.info("Waiting for task: %s", task)
    try:
        return task.apply_async().wait(timeout=self.timeout)
    except CeleryTimeoutError as e:
        raise HadesTimeout("The Hades lookup task has timed out") from e
    except OSError as e:
        if "timeout" in str(e).lower():
            # TODO this is mainly to make this error visible once it occurs (sentry).
            # Since timeouts should actually be handled by the branch above,
            # I'm not quite sure in what cases an `OSError` would be thrown!
            self.logger.error("Hades task timed out with OSError", exc_info=True)
            raise HadesTimeout("The Hades lookup task has timed out (from OSError)") from e
        else:
            raise
    except OperationalError as e:
        raise HadesOperationalError("OSError when fetching hades logs") from e