{"record":{"id":"53290678539d70da","repo":"odysseus-dev/odysseus","slug":"research-not-found","errorCode":null,"errorMessage":"Research not found","messagePattern":"Research not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"routes/research/research_routes.py","lineNumber":55,"sourceCode":"    root = _research_storage_root()\n    for stored_path in root.glob(\"*.json\"):\n        if stored_path.name != expected_name:\n            continue\n        resolved = stored_path.resolve()\n        try:\n            resolved.relative_to(root)\n        except ValueError:\n            return None\n        if not resolved.is_file():\n            return None\n        return resolved\n    return None\n\n\ndef _require_research_path(session_id: str) -> Path:\n    path = _find_research_path(session_id)\n    if path is None:\n        raise HTTPException(404, \"Research not found\")\n    return path\n\n\ndef _find_owned_research_path(session_id: str, user: str) -> Path | None:\n    path = _find_research_path(session_id)\n    if path is None:\n        return None\n    try:\n        owner = json.loads(path.read_text(encoding=\"utf-8\")).get(\"owner\")\n    except Exception:\n        return None\n    if owner != user:\n        return None\n    return path\n\n\nlogger = logging.getLogger(__name__)\n","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/research/research_routes.py#L37-L73","documentation":"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.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","solutions":["Refresh the research list; the entry may have been deleted.","Verify the research id is correct."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","contentChangedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}