(item_id: str)
| 10 | |
| 11 | @app.get("/items/{item_id}") |
| 12 | async def read_item(item_id: str): |
| 13 | if item_id not in items: |
| 14 | raise HTTPException( |
| 15 | status_code=404, |
| 16 | detail="Item not found", |
| 17 | headers={"X-Error": "Some custom header"}, |
| 18 | ) |
| 19 | return {"item": items[item_id]} |
| 20 | |
| 21 | |
| 22 | @app.get("/http-no-body-statuscode-exception") |
nothing calls this directly
no test coverage detected
searching dependent graphs…