{"record":{"id":"ea7b7dd7b8ec915b","repo":"HKUDS/DeepTutor","slug":"entry-not-found-ea7b7d","errorCode":null,"errorMessage":"Entry not found","messagePattern":"Entry not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"deeptutor/api/routers/question_notebook.py","lineNumber":273,"sourceCode":"\n@router.get(\"/entries/lookup/by-question\")\nasync def lookup_entry(\n    session_id: str = Query(...),\n    question_id: str = Query(...),\n    turn_id: str | None = Query(default=None),\n    missing_ok: bool = Query(\n        default=False,\n        description=\"Return 204 No Content instead of 404 when the entry is \"\n        \"absent — used by the quiz viewer to probe not-yet-saved questions \"\n        \"without logging noisy 404s.\",\n    ),\n):\n    store = get_sqlite_session_store()\n    entry = await store.find_notebook_entry(session_id, question_id, turn_id=turn_id)\n    if entry is None:\n        if missing_ok:\n            return Response(status_code=204)\n        raise HTTPException(status_code=404, detail=\"Entry not found\")\n    return entry\n\n\n@router.get(\"/entries/{entry_id}\", response_model=NotebookEntryItem)\nasync def get_entry(entry_id: int) -> NotebookEntryItem:\n    store = get_sqlite_session_store()\n    entry = await store.get_notebook_entry(entry_id)\n    if entry is None:\n        raise HTTPException(status_code=404, detail=\"Entry not found\")\n    return NotebookEntryItem(**entry)\n\n\n@router.patch(\"/entries/{entry_id}\")\nasync def update_entry(entry_id: int, payload: EntryUpdateRequest):\n    store = get_sqlite_session_store()\n    updates = payload.model_dump(exclude_none=True)\n    if not updates:\n        raise HTTPException(status_code=400, detail=\"No fields to update\")","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/question_notebook.py#L255-L291","documentation":"Error \"Entry not found\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/api/routers/question_notebook.py:273 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}