{"record":{"id":"a28d2c46a6895598","repo":"bytedance/deer-flow","slug":"failed-to-roll-back-custom-skill-str-e","errorCode":null,"errorMessage":"Failed to roll back custom skill: {str(e)}","messagePattern":"Failed to roll back custom skill: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"backend/app/gateway/routers/skills.py","lineNumber":406,"sourceCode":"        }\n        if scan.decision == \"block\":\n            await asyncio.to_thread(storage.append_history, skill_name, history_entry)\n            raise HTTPException(status_code=400, detail=f\"Rollback blocked by security scanner: {scan.reason}\")\n        await asyncio.to_thread(storage.write_custom_skill, skill_name, SKILL_MD_FILE, target_content)\n        await asyncio.to_thread(storage.append_history, skill_name, history_entry)\n        await refresh_user_skills_system_prompt_cache_async(get_effective_user_id())\n        return await _read_custom_skill_response(skill_name, config)\n    except HTTPException:\n        raise\n    except IndexError:\n        raise HTTPException(status_code=400, detail=\"history_index is out of range\")\n    except FileNotFoundError as e:\n        raise HTTPException(status_code=404, detail=str(e))\n    except ValueError as e:\n        raise HTTPException(status_code=400, detail=str(e))\n    except Exception as e:\n        logger.error(\"Failed to roll back custom skill %s: %s\", skill_name, e, exc_info=True)\n        raise HTTPException(status_code=500, detail=f\"Failed to roll back custom skill: {str(e)}\")\n\n\n@router.get(\n    \"/skills/{skill_name}\",\n    response_model=SkillResponse,\n    summary=\"Get Skill Details\",\n    description=\"Retrieve detailed information about a specific skill by its name.\",\n)\nasync def get_skill(skill_name: str, config: AppConfig = Depends(get_config)) -> SkillResponse:\n    try:\n        skill_name = skill_name.replace(\"\\r\\n\", \"\").replace(\"\\n\", \"\")\n        skills = _get_user_skill_storage(config).load_skills(enabled_only=False)\n        skill = next((s for s in skills if s.name == skill_name), None)\n\n        if skill is None:\n            raise HTTPException(status_code=404, detail=f\"Skill '{skill_name}' not found\")\n\n        return _skill_to_response(skill)","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/gateway/routers/skills.py#L388-L424","documentation":"Error \"Failed to roll back custom skill: {str(e)}\" thrown in bytedance/deer-flow.","triggerScenarios":"Thrown at backend/app/gateway/routers/skills.py:406 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the Gateway logs for the underlying rollback error.","Verify the target history entry exists and passes the security scan, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}