HKUDS/DeepTutor · error · HTTPException

Skill not found: {name}

Error message

Skill not found: {name}

What it means

Error "Skill not found: {name}" thrown in HKUDS/DeepTutor.

Source

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

    return detail


@router.get("/{name}")
async def get_skill(name: str) -> dict[str, object]:
    service = get_skill_service()
    try:
        return service.get_detail(name).to_dict()
    except SkillNotFoundError:
        # User scope doesn't have it. Fall through to admin-assigned lookup
        # below, which returns 403 if the user has no grant for it.
        pass
    except InvalidSkillNameError as exc:
        raise HTTPException(status_code=400, detail=str(exc))

    user = get_current_user()
    if user.is_admin:
        # Admin scope already checked above; nothing else to look at.
        raise HTTPException(status_code=404, detail=f"Skill not found: {name}")
    if name not in assigned_skill_ids(user.id):
        raise HTTPException(status_code=403, detail="Skill is not assigned to you")
    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 []),
        )

View on GitHub (pinned to 3e82f13042)

When it happens

Trigger: Thrown at deeptutor/api/routers/skills.py:205 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/85099ebd9b05d894. Report an issue: GitHub.