fix: harden task3 qdrant compatibility boundaries
This commit is contained in:
@@ -18,7 +18,7 @@ from tht.cli.schema_cmd import (
|
||||
physical_path,
|
||||
)
|
||||
from tht.config import Config, ConfigError
|
||||
from tht.ports.vector import VectorWriteRecord
|
||||
from tht.ports.vector import SemanticIndexIncompatibleError, VectorWriteRecord
|
||||
from tht.vectorstore.store import SyncStats, content_hash
|
||||
|
||||
vector_app = typer.Typer(help="Indice semantico Qdrant (derivato, rigenerabile)")
|
||||
@@ -265,6 +265,12 @@ def index_schema_cmd(
|
||||
_vector_cfg_or_error(cfg)
|
||||
physical, annotations = _load_schema_artifacts(cfg)
|
||||
payload = index_schema_data(cfg, physical=physical, annotations=annotations)
|
||||
except SemanticIndexIncompatibleError:
|
||||
if json_output:
|
||||
typer.echo(json.dumps({"status": "failed", "code": "semantic_index_incompatible"}, sort_keys=True, separators=(",", ":")))
|
||||
raise typer.Exit(code=1) from None
|
||||
typer.secho("ERRORE: indice semantico incompatibile.", fg=typer.colors.RED, err=True)
|
||||
raise typer.Exit(code=1) from None
|
||||
except _MachineVectorError as error:
|
||||
if json_output:
|
||||
typer.echo(json.dumps({"status": "failed", "code": error.code}, sort_keys=True, separators=(",", ":")))
|
||||
|
||||
Reference in New Issue
Block a user