{"record":{"id":"ae12f4d5e65ceb50","repo":"HKUDS/DeepTutor","slug":"entry-not-found","errorCode":null,"errorMessage":"Entry not found","messagePattern":"Entry not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"warning","filePath":"deeptutor/api/routers/dashboard.py","lineNumber":84,"sourceCode":"@router.post(\"/suggestions/refresh\")\nasync def refresh_starter_suggestions():\n    \"\"\"Generate a new set now. Backs the reroll control.\n\n    Synchronous, unlike the read: a human clicked and is waiting for a\n    different set.\n    \"\"\"\n    from deeptutor.services.suggestions import refresh_suggestions\n\n    result = await refresh_suggestions()\n    return {**result.to_dict(), \"stale\": False}\n\n\n@router.get(\"/{entry_id}\")\nasync def get_activity_entry(entry_id: str):\n    store = get_session_store()\n    session = await store.get_session_with_messages(entry_id)\n    if session is None:\n        raise HTTPException(status_code=404, detail=\"Entry not found\")\n\n    capability = str(session.get(\"capability\") or \"chat\")\n    return {\n        \"id\": session.get(\"session_id\"),\n        \"type\": capability.replace(\"deep_\", \"\"),\n        \"capability\": capability,\n        \"title\": session.get(\"title\"),\n        \"timestamp\": session.get(\"updated_at\", session.get(\"created_at\")),\n        \"content\": {\n            \"messages\": session.get(\"messages\", []),\n            \"active_turns\": session.get(\"active_turns\", []),\n            \"status\": session.get(\"status\", \"idle\"),\n            \"summary\": session.get(\"compressed_summary\", \"\"),\n        },\n    }\n","sourceCodeStart":66,"sourceCodeEnd":100,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/dashboard.py#L66-L100","documentation":"404 from GET /dashboard/activity/{entry_id} (dashboard router) when the session store has no session with that id (get_session_with_messages returns None). Activity entries are sessions; a missing session means the entry does not exist.","triggerScenarios":"GET /dashboard/{entry_id} with an unknown, deleted, or expired session id; sessions stored in a fresh/reset SQLite store.","commonSituations":"Session retention cleaned up old rows, database reset between environments, or a dashboard holding ids from a previous deployment.","solutions":["Confirm the session exists in the session store (SQLite)","If the store was reset, regenerate activity by running new sessions","Drop stale entries from the dashboard view on 404"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"ids = {e['id'] for e in client.get('/dashboard/activity').json()['entries']}\nif entry_id not in ids:\n    skip()","typeGuard":null,"tryCatchPattern":"resp = client.get(f'/dashboard/{entry_id}')\nif resp.status_code == 404:\n    prune_from_dashboard(entry_id)","preventionTips":["Refresh activity lists after store resets","Expect old sessions to expire under retention policies"],"tags":["dashboard","http-404","session","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}