full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
🐛 Handle non-existing user IDs in `read_user_by_id`
Fix an issue where read_user_by_id would fail to return if the requested user ID did not exist.
- Return
404 - Not Foundwhen ID does not exist. - Request without sufficient permission will always result in
403 - Unauthorized. - Add tests to test requesting non-existing user IDs as superuser and normal user.