fix(triplet-store): preserve missing backend dependency errors

This commit is contained in:
林SO
2026-08-05 22:36:19 +08:00
parent 0e1b88a593
commit b52cdd5bbe
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -156,9 +156,11 @@ class TripletStore:
self.logger.info(f"Initialized {self.backend_type} backend")
except ImportError:
raise
except Exception as e:
self.logger.error(f"Failed to initialize {self.backend_type} backend: {e}")
raise ProcessingError(f"Failed to initialize backend: {e}")
raise ProcessingError(f"Failed to initialize backend: {e}") from e
def store(
self,
+1 -1
View File
@@ -158,4 +158,4 @@ def test_missing_optional_dependency_has_install_hint():
side_effect=import_without_oxigraph,
):
with pytest.raises(ImportError, match="tripletstore-oxigraph"):
OxigraphStore()
_store()