mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-15 04:12:25 +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:
|
try:
|
||||||
from gateway.status import write_runtime_status
|
from gateway.status import write_runtime_status
|
||||||
write_runtime_status(platform=self.platform.value, platform_state="connected", error_code=None, error_message=None)
|
write_runtime_status(platform=self.platform.value, platform_state="connected", error_code=None, error_message=None)
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
pass
|
logger.warning("Failed to write runtime status (connected) for %s: %s", self.platform.value, exc)
|
||||||
|
|
||||||
def _mark_disconnected(self) -> None:
|
def _mark_disconnected(self) -> None:
|
||||||
self._running = False
|
self._running = False
|
||||||
|
|
@ -1317,8 +1317,8 @@ class BasePlatformAdapter(ABC):
|
||||||
try:
|
try:
|
||||||
from gateway.status import write_runtime_status
|
from gateway.status import write_runtime_status
|
||||||
write_runtime_status(platform=self.platform.value, platform_state="disconnected", error_code=None, error_message=None)
|
write_runtime_status(platform=self.platform.value, platform_state="disconnected", error_code=None, error_message=None)
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
pass
|
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:
|
def _set_fatal_error(self, code: str, message: str, *, retryable: bool) -> None:
|
||||||
self._running = False
|
self._running = False
|
||||||
|
|
@ -1333,8 +1333,8 @@ class BasePlatformAdapter(ABC):
|
||||||
error_code=code,
|
error_code=code,
|
||||||
error_message=message,
|
error_message=message,
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
pass
|
logger.warning("Failed to write runtime status (fatal) for %s: %s", self.platform.value, exc)
|
||||||
|
|
||||||
async def _notify_fatal_error(self) -> None:
|
async def _notify_fatal_error(self) -> None:
|
||||||
handler = self._fatal_error_handler
|
handler = self._fatal_error_handler
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue