Function
get_user_or_404
(
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
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…