{"record":{"id":"64ddaaab93605ced","repo":"odysseus-dev/odysseus","slug":"upload-cleanup-aborted-because-upload-index-integr","errorCode":null,"errorMessage":"Upload cleanup aborted because upload index integrity could not be verified","messagePattern":"Upload cleanup aborted because upload index integrity could not be verified","errorType":"http","errorClass":"HTTPException","httpStatus":503,"severity":"error","filePath":"routes/upload_routes.py","lineNumber":331,"sourceCode":"                continue\n        \n        if not out:\n            raise HTTPException(500, \"All file uploads failed\")\n            \n        return {\"files\": out}\n    \n    @router.post(\"/cleanup\")\n    async def manual_cleanup(request: Request):\n        \"\"\"Manually trigger cleanup of old uploads.\"\"\"\n        require_admin(request)\n        try:\n            cleaned_count = await asyncio.to_thread(\n                _run_reference_safe_cleanup,\n                upload_handler,\n            )\n        except UploadCleanupSafetyError:\n            logger.exception(\"Upload cleanup aborted because index safety checks failed\")\n            raise HTTPException(\n                503,\n                \"Upload cleanup aborted because upload index integrity could not be verified\",\n            )\n        except Exception:\n            logger.exception(\"Upload cleanup skipped because reference discovery failed\")\n            raise HTTPException(\n                503,\n                \"Upload cleanup skipped because persisted references could not be verified\",\n            )\n        return {\"status\": \"success\", \"files_cleaned\": cleaned_count}\n\n    @router.get(\"/stats\")\n    async def upload_stats(request: Request):\n        \"\"\"Get statistics about uploaded files.\"\"\"\n        require_admin(request)\n        try:\n            return upload_handler.get_upload_stats()\n        except Exception as e:","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/upload_routes.py#L313-L349","documentation":"Error \"Upload cleanup aborted because upload index integrity could not be verified\" 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":["Investigate the upload index inconsistency before rerunning cleanup.","Restore the upload index from backup, then retry the cleanup."],"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"}