Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

solving qodo review

Sameer63059b7a33031cf8
diff --git a/semantica/explorer/routes/analytics.py b/semantica/explorer/routes/analytics.py
index 39d08e5a..357ce440 100644
--- a/semantica/explorer/routes/analytics.py
+++ b/semantica/explorer/routes/analytics.py
@@ -5,7 +5,7 @@ Analytics routes for graph metrics and validation.
import asyncio
from typing import Optional
-from fastapi import APIRouter, Depends, Query, HTTPException, Response
+from fastapi import APIRouter, Depends, Query, Response
from ..dependencies import get_session
from ..schemas import AnalyticsResponse, ValidationIssue, ValidationReportResponse
diff --git a/semantica/explorer/routes/ontology.py b/semantica/explorer/routes/ontology.py
index 6ce0470f..79fcd09b 100644
--- a/semantica/explorer/routes/ontology.py
+++ b/semantica/explorer/routes/ontology.py
@@ -1400,9 +1400,9 @@ async def create_ontology(
logger.info(f"Generated ontology from sample data with {len(nodes)} nodes, {len(edges)} edges")
except Exception as exc:
- logger.exception("Failed to generate ontology from sample data; falling back to minimal ontology.")
+ logger.exception("Failed to generate ontology from sample data; aborting ontology creation.")
logger.warning(f"OntologyEngine.from_data error: {exc}")
- raise HTTPException(status_code=500, detail=str(exc))
+ raise HTTPException(status_code=500, detail="Ontology generation failed")
elif body.mode == "text" and body.schema_text:
try:
@@ -1471,9 +1471,9 @@ async def create_ontology(
logger.info(f"Generated ontology from text with {len(nodes)} nodes, {len(edges)} edges")
except Exception as exc:
- logger.exception("Failed to generate ontology from schema text; falling back to minimal ontology.")
+ logger.exception("Failed to generate ontology from schema text; aborting ontology creation.")
logger.warning(f"OntologyEngine.from_text error: {exc}")
- raise HTTPException(status_code=500, detail=str(exc))
+ raise HTTPException(status_code=500, detail="Ontology generation failed")
nodes_added = await asyncio.to_thread(session.add_nodes, nodes)
edges_added = await asyncio.to_thread(session.add_edges, edges)
diff --git a/semantica/explorer/routes/temporal.py b/semantica/explorer/routes/temporal.py
index 71c47e52..87cec85c 100644
--- a/semantica/explorer/routes/temporal.py
+++ b/semantica/explorer/routes/temporal.py
@@ -117,7 +117,7 @@ async def temporal_patterns(
return TemporalPatternResponse(patterns=[])
except Exception as exc:
logger.warning("temporal_patterns failed: %s", exc, exc_info=True)
- raise HTTPException(status_code=500, detail=str(exc))
+ raise HTTPException(status_code=500, detail="Temporal pattern detection failed")
@router.get("/bounds", response_model=TemporalBoundsResponse)