fix: 404 instead of 300 for ambiguous email_or_person#8004
Merged
rjsparks merged 4 commits intoietf-tools:mainfrom Oct 16, 2024
Merged
fix: 404 instead of 300 for ambiguous email_or_person#8004rjsparks merged 4 commits intoietf-tools:mainfrom
rjsparks merged 4 commits intoietf-tools:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8004 +/- ##
==========================================
+ Coverage 88.78% 88.91% +0.12%
==========================================
Files 296 304 +8
Lines 41320 41279 -41
==========================================
+ Hits 36687 36703 +16
+ Misses 4633 4576 -57 ☔ View full report in Codecov by Sentry. |
Member
|
The line exposing username was incorrect anyhow. |
rjsparks
approved these changes
Oct 16, 2024
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This changes both the CommunityList family of views and the Person photo view to return a 404 instead of a 300 if the
email_or_namein the URL is ambiguous. In both cases, the old approach was attempting to be helpful but assumed that everyPersonmatched had aUserwhose username could be used as a unique identifier. That is not true, so something needs to be done.While the 300 response with a list of usernames (or email addresses) is arguably helpful and friendly, I don't think a 404 is wrong - we're just declaring that we don't have a CommunityList or Photo that can be found at that URL. In either context, someone who is bothered by the missing resource is likely to complain about it and we can address the underlying issue.
Fixes #8003