HKUDS/DeepTutor · error · HTTPException

Skill already exists: {payload.name}

Error message

Skill already exists: {payload.name}

What it means

Error "Skill already exists: {payload.name}" thrown in HKUDS/DeepTutor.

Source

Thrown at deeptutor/api/routers/skills.py:226

    detail = assigned_skill_detail(name)
    if detail is None:
        raise HTTPException(status_code=404, detail=f"Skill not found: {name}")
    return detail


@router.post("/create")
async def create_skill(payload: CreateSkillRequest) -> dict[str, object]:
    service = get_skill_service()
    try:
        info = service.create(
            name=payload.name,
            description=payload.description,
            content=payload.content,
            tags=list(payload.tags or []),
        )
        return info.to_dict()
    except SkillExistsError:
        raise HTTPException(status_code=409, detail=f"Skill already exists: {payload.name}")
    except InvalidSkillNameError as exc:
        raise HTTPException(status_code=400, detail=str(exc))
    except InvalidTagError as exc:
        raise HTTPException(status_code=400, detail=str(exc))


@router.post("/install")
async def install_skill(payload: InstallSkillRequest) -> dict[str, object]:
    """Import a hub skill (e.g. from EduHub) into the caller's own skill layer.

    Lands the package in the same per-user dir that ``/create`` writes to, so
    the imported skill shows up in this user's Skills list. The install gate
    (``suspicious`` verdict abort, safe extraction, ``always`` stripping)
    lives in :func:`deeptutor.services.skill.hub.install_from_hub`.
    """
    import asyncio

    from deeptutor.services.skill.hub import HubError, install_from_hub

View on GitHub (pinned to 3e82f13042)

When it happens

Trigger: Thrown at deeptutor/api/routers/skills.py:226 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27). Data as JSON: /api/errors/1e2b1be4bfaea820. Report an issue: GitHub.