mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(gateway): log platform status write failures instead of silently swallowing
This commit is contained in:
parent
755b74fc2d
commit
5d9061148f
1 changed files with 6 additions and 6 deletions
|
|
@ -1307,8 +1307,8 @@ class BasePlatformAdapter(ABC):
|
|||
try:
|
||||
from gateway.status import write_runtime_status
|
||||
write_runtime_status(platform=self.platform.value, platform_state="connected", error_code=None, error_message=None)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.warning("Failed to write runtime status (connected) for %s: %s", self.platform.value, exc)
|
||||
|
||||
def _mark_disconnected(self) -> None:
|
||||
self._running = False
|
||||
|
|
@ -1317,8 +1317,8 @@ class BasePlatformAdapter(ABC):
|
|||
try:
|
||||
from gateway.status import write_runtime_status
|
||||
write_runtime_status(platform=self.platform.value, platform_state="disconnected", error_code=None, error_message=None)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.warning("Failed to write runtime status (disconnected) for %s: %s", self.platform.value, exc)
|
||||
|
||||
def _set_fatal_error(self, code: str, message: str, *, retryable: bool) -> None:
|
||||
self._running = False
|
||||
|
|
@ -1333,8 +1333,8 @@ class BasePlatformAdapter(ABC):
|
|||
error_code=code,
|
||||
error_message=message,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.warning("Failed to write runtime status (fatal) for %s: %s", self.platform.value, exc)
|
||||
|
||||
async def _notify_fatal_error(self) -> None:
|
||||
handler = self._fatal_error_handler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue