From f9a650a4d73dd76656f27cbff39f7584a83f5826 Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:35:06 -0600 Subject: [PATCH] feat: add traceback logging and spec-aligned error message to GeminiEngine (refs #142) Co-Authored-By: Claude Opus 4.6 --- ocr/app/engines/gemini_engine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ocr/app/engines/gemini_engine.py b/ocr/app/engines/gemini_engine.py index 5a1a61b..b26a3c0 100644 --- a/ocr/app/engines/gemini_engine.py +++ b/ocr/app/engines/gemini_engine.py @@ -148,13 +148,15 @@ class GeminiEngine: return self._model except ImportError as exc: + logger.exception("Vertex AI SDK import failed") raise GeminiUnavailableError( "google-cloud-aiplatform is not installed. " "Install with: pip install google-cloud-aiplatform" ) from exc except Exception as exc: + logger.exception("Vertex AI authentication failed") raise GeminiUnavailableError( - f"Failed to initialize Gemini engine: {exc}" + f"Vertex AI authentication failed: {exc}" ) from exc def extract_maintenance(