fix(core): restore adapter command behavior

This commit is contained in:
2026-07-11 21:04:53 +02:00
parent a35efa16de
commit 45d57756aa
7 changed files with 141 additions and 29 deletions
+3 -2
View File
@@ -21,11 +21,12 @@ class ThothRestDwhAdapter:
try:
result = self._client.ping()
except RestError as exc:
return DwhHealth(ok=False, detail=str(exc))
return DwhHealth(ok=False, detail=str(exc), error_kind="connection")
ok = bool(result.get("db_connected") and result.get("schema_accessible"))
return DwhHealth(ok=ok, detail=None if ok else str(result),
database=self._database.database, schema=self._database.db_schema,
endpoint=self._client.cfg.base_url, read_only=True)
endpoint=self._client.cfg.base_url, read_only=True,
error_kind=None if ok else "inaccessible")
def introspect(self) -> PhysicalSchema:
return introspect_rest(