{"record":{"id":"7ffeb59a86b4a10e","repo":"bytedance/deer-flow","slug":"custom-skill-skill-name-has-no-history","errorCode":null,"errorMessage":"Custom skill '{skill_name}' has no history","messagePattern":"Custom skill '(.+?)' has no history","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"backend/app/gateway/routers/skills.py","lineNumber":369,"sourceCode":"            raise HTTPException(status_code=404, detail=f\"Custom skill '{skill_name}' not found\")\n        return CustomSkillHistoryResponse(history=history)\n    except HTTPException:\n        raise\n    except Exception as e:\n        logger.error(\"Failed to read history for %s: %s\", skill_name, e, exc_info=True)\n        raise HTTPException(status_code=500, detail=f\"Failed to read history: {str(e)}\")\n\n\n@router.post(\"/skills/custom/{skill_name}/rollback\", response_model=CustomSkillContentResponse, summary=\"Rollback Custom Skill\")\nasync def rollback_custom_skill(skill_name: str, body: SkillRollbackRequest, request: Request, config: AppConfig = Depends(get_config)) -> CustomSkillContentResponse:\n    await require_admin_user(request, detail=_ADMIN_REQUIRED_DETAIL)\n    try:\n        storage = _get_user_skill_storage(config)\n        if not storage.custom_skill_exists(skill_name) and not storage.get_skill_history_file(skill_name).exists():\n            raise HTTPException(status_code=404, detail=f\"Custom skill '{skill_name}' not found\")\n        history = storage.read_history(skill_name)\n        if not history:\n            raise HTTPException(status_code=400, detail=f\"Custom skill '{skill_name}' has no history\")\n        record = history[body.history_index]\n        target_content = record.get(\"prev_content\")\n        if target_content is None:\n            raise HTTPException(status_code=400, detail=\"Selected history entry has no previous content to roll back to\")\n        storage.validate_skill_markdown_content(skill_name, target_content)\n        static_findings = await _scan_static_skill_markdown_or_raise(skill_name, target_content, app_config=config)\n        scan = await scan_skill_content(target_content, executable=False, location=f\"{skill_name}/{SKILL_MD_FILE}\", app_config=config, static_findings=static_findings)\n        skill_file = storage.get_custom_skill_file(skill_name)\n        current_content = skill_file.read_text(encoding=\"utf-8\") if skill_file.exists() else None\n        history_entry = {\n            \"action\": \"rollback\",\n            \"author\": \"human\",\n            \"thread_id\": None,\n            \"file_path\": SKILL_MD_FILE,\n            \"prev_content\": current_content,\n            \"new_content\": target_content,\n            \"rollback_from_ts\": record.get(\"ts\"),\n            \"scanner\": {\"decision\": scan.decision, \"reason\": scan.reason, \"static_findings\": static_findings},","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/gateway/routers/skills.py#L351-L387","documentation":"Error \"Custom skill '{skill_name}' has no history\" thrown in bytedance/deer-flow.","triggerScenarios":"Thrown at backend/app/gateway/routers/skills.py:369 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Edit and save the custom skill at least once to create a history entry before requesting history.","Confirm the skill_name matches an existing custom skill."],"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-15T22:17:37.221Z"}