From 4219622e1bc8fdf8b3a254e88e019b96ec625600 Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:04:02 -0700 Subject: [PATCH] refactor(ai): log when the vector-index check fails Co-Authored-By: Claude Opus 4.8 (1M context) --- src/paperless_ai/vector_store.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/paperless_ai/vector_store.py b/src/paperless_ai/vector_store.py index 363bb568d..8f58a4b3c 100644 --- a/src/paperless_ai/vector_store.py +++ b/src/paperless_ai/vector_store.py @@ -239,7 +239,10 @@ class PaperlessLanceVectorStore(BasePydanticVectorStore): "vector" in (getattr(idx, "columns", []) or []) for idx in self._table.list_indices() ) - except Exception: # pragma: no cover - older lancedb without list_indices + except ( + Exception + ) as exc: # pragma: no cover - older lancedb without list_indices + logger.debug("Could not check for vector index (assuming absent): %s", exc) return False def maybe_create_ann_index(self, min_rows: int = ANN_INDEX_MIN_ROWS) -> None: