{"record":{"id":"31d3b894da13c38a","repo":"bytedance/deer-flow","slug":"failed-to-update-custom-skill-str-e","errorCode":null,"errorMessage":"Failed to update custom skill: {str(e)}","messagePattern":"Failed to update custom skill: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"backend/app/gateway/routers/skills.py","lineNumber":301,"sourceCode":"                \"author\": \"human\",\n                \"thread_id\": None,\n                \"file_path\": SKILL_MD_FILE,\n                \"prev_content\": prev_content,\n                \"new_content\": body.content,\n                \"scanner\": {\"decision\": scan.decision, \"reason\": scan.reason, \"static_findings\": static_findings},\n            },\n        )\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 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 update custom skill %s: %s\", skill_name, e, exc_info=True)\n        raise HTTPException(status_code=500, detail=f\"Failed to update custom skill: {str(e)}\")\n\n\n@router.delete(\"/skills/custom/{skill_name}\", summary=\"Delete Custom Skill\")\nasync def delete_custom_skill(skill_name: str, request: Request, config: AppConfig = Depends(get_config)) -> dict[str, bool]:\n    await require_admin_user(request, detail=_ADMIN_REQUIRED_DETAIL)\n    try:\n        skill_name = skill_name.replace(\"\\r\\n\", \"\").replace(\"\\n\", \"\")\n        storage = _get_user_skill_storage(config)\n        await asyncio.to_thread(\n            storage.delete_custom_skill,\n            skill_name,\n            history_meta={\n                \"action\": \"human_delete\",\n                \"author\": \"human\",\n                \"thread_id\": None,\n                \"file_path\": SKILL_MD_FILE,\n                \"prev_content\": None,\n                \"new_content\": None,","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/gateway/routers/skills.py#L283-L319","documentation":"Error \"Failed to update custom skill: {str(e)}\" thrown in bytedance/deer-flow.","triggerScenarios":"Thrown at backend/app/gateway/routers/skills.py:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the Gateway logs for the underlying update error (validation, scan failure, or IO).","Ensure the skill content passes the security scanner and required files (SKILL.md) are present."],"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"}