{"record":{"id":"3ca980edcf647569","repo":"HKUDS/DeepTutor","slug":"no-fields-to-update-3ca980","errorCode":null,"errorMessage":"No fields to update","messagePattern":"No fields to update","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"deeptutor/api/routers/question_notebook.py","lineNumber":291,"sourceCode":"        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\")\n    updated = await store.update_notebook_entry(entry_id, updates)\n    if not updated:\n        raise HTTPException(status_code=404, detail=\"Entry not found\")\n    return {\"updated\": True, \"id\": entry_id}\n\n\n@router.delete(\"/entries/{entry_id}\")\nasync def delete_entry(entry_id: int):\n    store = get_sqlite_session_store()\n    deleted = await store.delete_notebook_entry(entry_id)\n    if not deleted:\n        raise HTTPException(status_code=404, detail=\"Entry not found\")\n    return {\"deleted\": True, \"id\": entry_id}\n\n\n# ── Entry ↔ Category linking ────────────────────────────────────\n\n","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/question_notebook.py#L273-L309","documentation":"Error \"No fields to update\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/api/routers/question_notebook.py:291 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"}