odysseus-dev/odysseus · error · HTTPException
Research not found
Error message
Research not found
What it means
A 404 guard in _require_research_path: no persisted research JSON matching the session id exists within the research storage root (or the match fell outside the root), so the requested research cannot be located. Fires for unknown, deleted, or non-owned session ids on detail/archive/result endpoints.
Solutions
- Refresh the research list; the entry may have been deleted.
- Verify the research id is correct.
Defensive patterns
Strategy: validation
When it happens
Trigger: Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.
Common situations: See trigger scenarios.
AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14).
Data as JSON: /api/errors/53290678539d70da.
Report an issue: GitHub.
Appendix: source
Thrown at routes/research/research_routes.py:55
root = _research_storage_root()
for stored_path in root.glob("*.json"):
if stored_path.name != expected_name:
continue
resolved = stored_path.resolve()
try:
resolved.relative_to(root)
except ValueError:
return None
if not resolved.is_file():
return None
return resolved
return None
def _require_research_path(session_id: str) -> Path:
path = _find_research_path(session_id)
if path is None:
raise HTTPException(404, "Research not found")
return path
def _find_owned_research_path(session_id: str, user: str) -> Path | None:
path = _find_research_path(session_id)
if path is None:
return None
try:
owner = json.loads(path.read_text(encoding="utf-8")).get("owner")
except Exception:
return None
if owner != user:
return None
return path
logger = logging.getLogger(__name__)
View on GitHub (pinned to f9235ebbf1)