{"record":{"id":"a9c43c253670fdc5","repo":"odysseus-dev/odysseus","slug":"audit-failed-result-error","errorCode":null,"errorMessage":"Audit failed: {result['error']}","messagePattern":"Audit failed: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":502,"severity":"error","filePath":"routes/memory/memory_routes.py","lineNumber":326,"sourceCode":"\n        endpoint_url, model, headers = resolve_task_endpoint(\n            fallback_url, fallback_model, fallback_headers, owner=user\n        )\n\n        if not endpoint_url or not model:\n            raise HTTPException(400, \"No default model configured — set one in Settings\")\n\n        result = await audit_memories(\n            memory_manager,\n            memory_vector,\n            endpoint_url,\n            model,\n            headers,\n            owner=user,\n        )\n\n        if \"error\" in result and \"before\" not in result:\n            raise HTTPException(502, f\"Audit failed: {result['error']}\")\n\n        return {\n            \"ok\": \"error\" not in result,\n            \"before\": result.get(\"before\", 0),\n            \"after\": result.get(\"after\", 0),\n            \"removed\": result.get(\"before\", 0) - result.get(\"after\", 0),\n            # True when the audit skipped the LLM because nothing changed\n            # since the last tidy. Frontend already says \"Already clean\"\n            # for removed==0, so this is here for future use / debugging.\n            \"already_tidy\": bool(result.get(\"already_tidy\")),\n        }\n\n    @router.post(\"/import\")\n    async def import_memories_from_file(\n        request: Request,\n        session: str | None = Form(None),\n        file: UploadFile = File(...)\n    ):","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/memory/memory_routes.py#L308-L344","documentation":"Error \"Audit failed: {result['error']}\" 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":["Check the audit result error and server logs for details.","Fix the underlying store issue reported, then rerun the audit."],"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-15T22:17:37.221Z"}