{"record":{"id":"e9dce4802f9b8687","repo":"HKUDS/DeepTutor","slug":"page-not-found","errorCode":null,"errorMessage":"Page not found","messagePattern":"Page not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"deeptutor/api/routers/book.py","lineNumber":237,"sourceCode":"    LearningCaptureStatus.REJECTED: {LearningCaptureStatus.REJECTED},\n}\n\n\ndef _is_capture_transition_allowed(\n    current: LearningCaptureStatus,\n    requested: LearningCaptureStatus,\n) -> bool:\n    return requested in _CAPTURE_TRANSITIONS.get(current, set())\n\n\ndef _derive_capture_title_values(book_id: str, page_id: str, block_id: str) -> tuple[str, str, str]:\n    engine = get_book_engine()\n    book = engine.load_book(book_id)\n    if book is None:\n        raise HTTPException(status_code=404, detail=\"Book not found\")\n    page = engine.load_page(book_id, page_id)\n    if page is None:\n        raise HTTPException(status_code=404, detail=\"Page not found\")\n\n    spine = engine.load_spine(book_id)\n    chapter_title = page.title\n    if spine is not None and page.chapter_id:\n        for chapter in spine.chapters:\n            if chapter.id == page.chapter_id:\n                chapter_title = chapter.title\n                break\n\n    base_locator = f\"/book/{book_id}/pages/{page_id}\"\n    source_locator = f\"{base_locator}/block/{block_id}\" if block_id else base_locator\n    return book.title, chapter_title, source_locator\n\n\ndef _find_capture_duplicate(\n    storage: Any,\n    book_id: str,\n    page_id: str,","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/book.py#L219-L255","documentation":"Error \"Page not found\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/api/routers/book.py:237 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"}