{"record":{"id":"349bf70ff6b5cded","repo":"zylon-ai/private-gpt","slug":"invalid-file-id","errorCode":null,"errorMessage":"Invalid file ID.","messagePattern":"Invalid file ID\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"private_gpt/server/files/file_service.py","lineNumber":228,"sourceCode":"        self._validate_file_id(storage_path)\n        if not storage_path.startswith(\"uploads/\"):\n            raise HTTPException(\n                status_code=404,\n                detail=f\"File '{file_id}' not found or is a sandbox output (cannot be deleted).\",\n            )\n        _folder, filename = storage_path.split(\"/\", 1)\n        deleted = await storage.delete_file(self._uploads_prefix(scope_id), filename)\n        if not deleted:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"File '{file_id}' not found or is a sandbox output (cannot be deleted).\",\n            )\n        return DeletedFile(id=file_id)\n\n    @staticmethod\n    def _validate_file_id(file_id: str) -> None:\n        if \"..\" in file_id.split(\"/\"):\n            raise HTTPException(status_code=400, detail=\"Invalid file ID.\")\n","sourceCodeStart":210,"sourceCodeEnd":229,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/server/files/file_service.py#L210-L229","documentation":"Error \"Invalid file ID.\" thrown in zylon-ai/private-gpt.","triggerScenarios":"Raised when the supplied file ID fails validation (malformed, empty, or not matching the expected format) before any lookup occurs.","commonSituations":"Client sends a hand-constructed or truncated file id to the files endpoint; also occurs when URL path parameters are mangled.","solutions":["Provide a valid file ID as returned by the file upload or list endpoint.","Check the file ID for typos or truncation before sending the request.","Use the files list endpoint to look up the correct file_id for the target file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}