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
+6 -1
View File
@@ -19,7 +19,12 @@ def ping_cmd(config: Path = CONFIG_OPT) -> None:
raise typer.Exit(code=1)
health = build_dwh(cfg).health()
if not health.ok:
typer.secho(f"ERRORE di connessione: {health.detail}", fg=typer.colors.RED, err=True)
message = (
f"ERRORE: DWH non accessibile via REST (risposta: {health.detail})."
if health.error_kind == "inaccessible"
else f"ERRORE di connessione: {health.detail}"
)
typer.secho(message, fg=typer.colors.RED, err=True)
raise typer.Exit(code=1)
if health.endpoint:
typer.secho(f"OK: connesso via REST a {health.endpoint} (schema {health.schema})",