diff --git a/haiku_rag_slim/haiku/rag/store/engine.py b/haiku_rag_slim/haiku/rag/store/engine.py index f57dc94d..f4204efe 100644 --- a/haiku_rag_slim/haiku/rag/store/engine.py +++ b/haiku_rag_slim/haiku/rag/store/engine.py @@ -586,11 +586,12 @@ class Store: ReadOnlyError: If the store is in read-only mode. """ self._assert_writable() - # Drop and recreate chunks table - try: + # Drop and recreate chunks table. Check existence first rather than + # catching-and-swallowing drop_table's errors — a catch-all would + # hide real failures (permissions, storage-backend errors) and then + # the subsequent create_table would fail confusingly. + if "chunks" in await self.db.table_names(): await self.db.drop_table("chunks") - except Exception: - pass # Update the ChunkRecord model with new vector dimension self.ChunkRecord = create_chunk_model(self.embedder._vector_dim)