Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on 500 error page for user:me when not signed in

Parent

500 error page for user:me when not signed in

+2
−0

When searching, a user can be specified by including user:X in the search term, where X is the user id of the relevant user. You can also search for your own posts by specifying user:me.

If you share a link to search results based on user:me then the recipient of the link will see results for their own user, provided they are signed in. However, if they are not signed in they will see a 500 error page instead.

Could this 500 error page be replaced with something more informative, since we know the reason for being unable to display the results?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+0
−0

I like both of Trichoplax's answers. I further submit that the HTTP response code should be 401 Unauthorized rather than 5xx.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

I'm not sure that giving a 401 is correct here; the problem is not one of authorisation, but just tha... (2 comments)
I'm not sure that giving a 401 is correct here; the problem is not one of authorisation, but just tha...
celtschk‭ wrote 5 days ago

I'm not sure that giving a 401 is correct here; the problem is not one of authorisation, but just that "me" is not well defined if you are not logged in. Probably 422 would be a more apt error code.

Michael‭ wrote 4 days ago

401 says its most common use is to let clients know the page isn't available without authentication... which is true. It's not that the information isn't available without auth, but the page is indeed unavailable without auth. I would also be okay with 422, but neither is perfect. I think 422 implies that it's the request body that can't be handled, not the auth.

TIL about 451 "Unavailable for legal reasons." I was already aware of 418 "I'm a teapot"