fix(core): restore adapter command behavior
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user