{"record":{"id":"100bf0441a806a9d","repo":"HKUDS/DeepTutor","slug":"folder-path-is-required","errorCode":null,"errorMessage":"folder_path is required.","messagePattern":"folder_path is required\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"deeptutor/api/routers/knowledge.py","lineNumber":1794,"sourceCode":"\n\nclass ConnectFolderRequest(BaseModel):\n    name: str\n    folder_path: str\n    rag_provider: str = DEFAULT_PROVIDER\n\n\n@router.post(\"/probe-folder\")\nasync def probe_linked_folder_route(payload: ProbeFolderRequest):\n    \"\"\"Inspect a local folder for a ready engine index before linking it.\n\n    Returns the probe verdict (ready index? embedding compatible? warnings?) so\n    the UI can present and confirm before any registration happens. Does not\n    create a knowledge base.\n    \"\"\"\n    folder_path = (payload.folder_path or \"\").strip()\n    if not folder_path:\n        raise HTTPException(status_code=400, detail=\"folder_path is required.\")\n    try:\n        folder = assert_path_allowed(folder_path)\n    except ValueError as e:\n        raise HTTPException(status_code=400, detail=str(e))\n    result = probe_linked_folder(str(folder), payload.rag_provider)\n    return result.to_dict()\n\n\n@router.post(\"/connect-folder\")\nasync def connect_linked_folder_route(payload: ConnectFolderRequest):\n    \"\"\"Mount an existing engine index as a read-only ``linked`` knowledge base.\n\n    Re-probes server-side (never trusts the client's verdict), then registers a\n    pointer to the folder. Retrieval reads the index in place — no copy, no\n    re-index. Embedding-mismatch warnings do not block the link (the user may\n    switch embedding models later); a missing/invalid index does.\n    \"\"\"\n    name = (payload.name or \"\").strip()","sourceCodeStart":1776,"sourceCodeEnd":1812,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/knowledge.py#L1776-L1812","documentation":"Error \"folder_path is required.\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/api/routers/knowledge.py:1794 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"}