From be2d8ea8f46735a17c166cef3625e88d470ea322 Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Wed, 5 Nov 2025 10:13:58 +0200 Subject: [PATCH] Catch import errors seperately to raise errors about missing dependencies. --- haiku_rag_slim/haiku/rag/reader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/haiku_rag_slim/haiku/rag/reader.py b/haiku_rag_slim/haiku/rag/reader.py index c710be49..d6103b5f 100644 --- a/haiku_rag_slim/haiku/rag/reader.py +++ b/haiku_rag_slim/haiku/rag/reader.py @@ -126,5 +126,7 @@ class FileReader: # Fallback: try to read as text and convert to DoclingDocument content = path.read_text(encoding="utf-8") return text_to_docling_document(content, name=f"{path.stem}.md") + except ImportError: + raise except Exception: raise ValueError(f"Failed to parse file: {path}")