{"record":{"id":"fd9eadb0ff7caf00","repo":"odysseus-dev/odysseus","slug":"directory-not-found-directory","errorCode":null,"errorMessage":"Directory not found: {directory}","messagePattern":"Directory not found: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"routes/personal_routes.py","lineNumber":200,"sourceCode":"        directory_request: DirectoryRequest,\n        owner: str = Depends(require_user), _admin: None = Depends(require_admin),\n    ):\n        \"\"\"\n        Add a directory and all its subdirectories/files to the RAG index.\n        \n        Args:\n            directory_request: Directory request model containing the directory path\n            \n        Returns:\n            JSON response with indexing results\n        \"\"\"\n        directory = directory_request.directory\n        try:\n            directory = _resolve_allowed_personal_dir(directory)\n            \n            # Security check - ensure directory exists and is accessible\n            if not os.path.exists(directory):\n                raise HTTPException(404, f\"Directory not found: {directory}\")\n            \n            if not os.path.isdir(directory):\n                raise HTTPException(400, f\"Path is not a directory: {directory}\")\n            \n            logger.info(f\"Adding directory to RAG: {directory}\")\n            \n            # Use the RAGManager to index the directory\n            rag = _rag()\n            if rag:\n                result = rag.index_personal_documents(directory, owner=owner)\n                \n                if result[\"success\"]:\n                    # Also update the personal_docs_manager to track this directory\n                    personal_docs_manager.add_directory(directory, index=False)\n                    \n                    return {\n                        \"success\": True,\n                        \"message\": f\"Successfully indexed {result['indexed_count']} chunks from {directory}\",","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/personal_routes.py#L182-L218","documentation":"Error \"Directory not found: {directory}\" thrown in odysseus-dev/odysseus.","triggerScenarios":"Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.","commonSituations":"See trigger scenarios.","solutions":["Verify the directory path exists on the server.","Refresh the directory list; the folder may have been moved or deleted."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}