{"record":{"id":"7fb50cf061290571","repo":"odysseus-dev/odysseus","slug":"failed-to-update-custom-preset","errorCode":null,"errorMessage":"Failed to update custom preset","messagePattern":"Failed to update custom preset","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"routes/preset_routes.py","lineNumber":50,"sourceCode":"\n    @router.post(\"/api/presets/custom\")\n    async def update_custom_preset(preset_update: PresetUpdateRequest, _admin: None = Depends(require_admin)) -> Dict[str, Any]:\n        try:\n            success = preset_manager.update_custom(\n                preset_update.temperature,\n                preset_update.max_tokens,\n                preset_update.system_prompt,\n                preset_update.name,\n                preset_update.enabled,\n                preset_update.inject_prefix,\n                preset_update.inject_suffix,\n            )\n            if success:\n                return {\"success\": True, \"message\": \"Custom preset updated\"}\n            return {\"success\": False, \"message\": \"Failed to save preset\"}\n        except Exception as e:\n            logger.error(f\"Preset update error: {e}\")\n            raise HTTPException(500, \"Failed to update custom preset\")\n\n    @router.get(\"/api/presets/templates\")\n    async def get_user_templates() -> List[Dict]:\n        return preset_manager.get_user_templates()\n\n    @router.post(\"/api/presets/templates\")\n    async def save_user_template(req: UserTemplateRequest, _admin: None = Depends(require_admin)) -> Dict[str, Any]:\n        template = req.model_dump()\n        if not template[\"id\"]:\n            template[\"id\"] = f\"user-{uuid.uuid4().hex[:8]}\"\n        success = preset_manager.save_user_template(template)\n        if success:\n            return {\"success\": True, \"template\": template}\n        return {\"success\": False, \"message\": \"Failed to save template\"}\n\n    @router.delete(\"/api/presets/templates/{template_id}\")\n    async def delete_user_template(template_id: str, _admin: None = Depends(require_admin)) -> Dict[str, Any]:\n        success = preset_manager.delete_user_template(template_id)","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/preset_routes.py#L32-L68","documentation":"Error \"Failed to update custom preset\" 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":["Retry the preset update; check server logs if it persists.","Verify the preset exists and the payload is valid."],"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"}