{"record":{"id":"f9fa613f234446ec","repo":"fastapi/full-stack-fastapi-template","slug":"item-not-found","errorCode":null,"errorMessage":"Item not found","messagePattern":"Item not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"backend/app/api/routes/items.py","lineNumber":55,"sourceCode":"            .where(Item.owner_id == current_user.id)\n            .order_by(col(Item.created_at).desc())\n            .offset(skip)\n            .limit(limit)\n        )\n        items = session.exec(statement).all()\n\n    items_public = [ItemPublic.model_validate(item) for item in items]\n    return ItemsPublic(data=items_public, count=count)\n\n\n@router.get(\"/{id}\", response_model=ItemPublic)\ndef read_item(session: SessionDep, current_user: CurrentUser, id: uuid.UUID) -> Any:\n    \"\"\"\n    Get item by ID.\n    \"\"\"\n    item = session.get(Item, id)\n    if not item:\n        raise HTTPException(status_code=404, detail=\"Item not found\")\n    if not current_user.is_superuser and (item.owner_id != current_user.id):\n        raise HTTPException(status_code=403, detail=\"Not enough permissions\")\n    return item\n\n\n@router.post(\"/\", response_model=ItemPublic)\ndef create_item(\n    *, session: SessionDep, current_user: CurrentUser, item_in: ItemCreate\n) -> Any:\n    \"\"\"\n    Create new item.\n    \"\"\"\n    item = Item.model_validate(item_in, update={\"owner_id\": current_user.id})\n    session.add(item)\n    session.commit()\n    session.refresh(item)\n    return item\n","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/fastapi/full-stack-fastapi-template/blob/8063fe54f17d19f01720e055103af9cad3d8f55d/backend/app/api/routes/items.py#L37-L73","documentation":"Error \"Item not found\" thrown in fastapi/full-stack-fastapi-template.","triggerScenarios":"Thrown at backend/app/api/routes/items.py:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8063fe54f17d19f01720e055103af9cad3d8f55d","analyzedAt":"2026-08-26T06:49:32.317Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}