MCPcopy
hub / github.com/fastapi/fastapi / put_invalid_user

Function put_invalid_user

tests/test_dependency_yield_except_httpexception.py:29–33  ·  view source on GitHub ↗
(
    user_id: str, name: str = Body(), db: dict = Depends(get_database)
)

Source from the content-addressed store, hash-verified

27
28@app.put("/invalid-user/{user_id}")
29def put_invalid_user(
30 user_id: str, name: str = Body(), db: dict = Depends(get_database)
31):
32 db[user_id] = name
33 raise HTTPException(status_code=400, detail="Invalid user")
34
35
36@app.put("/user/{user_id}")

Callers

nothing calls this directly

Calls 3

BodyClass · 0.90
DependsClass · 0.90
HTTPExceptionClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…