-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
π Handle non-existing user IDs in read_user_by_id
#1396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
saltie2193
wants to merge
3
commits into
fastapi:master
from
saltie2193:backend-read-user-by-id-no-user
Open
π Handle non-existing user IDs in read_user_by_id
#1396
saltie2193
wants to merge
3
commits into
fastapi:master
from
saltie2193:backend-read-user-by-id-no-user
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix an issue where `read_user_by_id` would fail to return if the requested user ID did not exist. * Return `404 - Not Found` when 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.
@alejsdev
alejsdev
changed the title
(ει€) π· Handle non-existing user IDs in
(θΏ½θ¨) π Handle non-existing user IDs in Oct 24, 2024
read_user_by_id
. (ει€γγγΎγ§)read_user_by_id
. (θΏ½θ¨γγγΎγ§)
@alejsdev
alejsdev
changed the title
(ει€) π Handle non-existing user IDs in
(θΏ½θ¨) π Handle non-existing user IDs in Oct 24, 2024
read_user_by_id
. (ει€γγγΎγ§)read_user_by_id
(θΏ½θ¨γγγΎγ§)
berar
commented
Nov 7, 2024
Hello. I'd like to know why this pull request has not been approved. It is valid.
bereydev
commented
Dec 28, 2024
Yeah pretty minor upgrade but it makes sens to merge IMO.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix an issue where
read_user_by_id
would fail to return if the requested user ID did not exist.404 - Not Found
when ID does not exist.403 - Unauthorized
.