diff --git a/src/forge/controller/service/interface.py b/src/forge/controller/service/interface.py index 3b6b4b687..250f22b85 100644 --- a/src/forge/controller/service/interface.py +++ b/src/forge/controller/service/interface.py @@ -179,10 +179,15 @@ def _get_internal_state(self): def __getattr__(self, name: str): """Forward all other attribute access to the underlying Service Actor.""" + try: + _service = object.__getattribute__(self, "_service") + except AttributeError: + raise AttributeError( + f"'{self.__class__.__name__}' object has no attribute '{name}'" + ) # Forward everything else to the _service - if hasattr(self._service, name): - return getattr(self._service, name) - + if hasattr(_service, name): + return getattr(_service, name) raise AttributeError( f"'{self.__class__.__name__}' object has no attribute '{name}'" )