MCPcopy Create free account
hub / github.com/fastapi-users/fastapi-users / get_user_or_404

Function get_user_or_404

fastapi_users/router/users.py:26–34  ·  view source on GitHub ↗
(
        id: str,
        user_manager: BaseUserManager[models.UP, models.ID] = Depends(get_user_manager),
    )

Source from the content-addressed store, hash-verified

24 )
25
26 async def get_user_or_404(
27 id: str,
28 user_manager: BaseUserManager[models.UP, models.ID] = Depends(get_user_manager),
29 ) -> models.UP:
30 try:
31 parsed_id = user_manager.parse_id(id)
32 return await user_manager.get(parsed_id)
33 except (exceptions.UserNotExists, exceptions.InvalidID) as e:
34 raise HTTPException(status_code=status.HTTP_404_NOT_FOUND) from e
35
36 @router.get(
37 "/me",

Callers

nothing calls this directly

Calls 2

parse_idMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…