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.

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

4 answers

You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.

+1
−0

In addition to whatever we do about the error, should we add a button/link/whatever for "share these results" on the results page? That way, if you meant to share your posts (specifically) with somebody else, you'd be able to do that without editing in your own user number. Sharing the URL re-evaluates "me", while this new link would be static.

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

1 comment thread

Maybe ask the user? (2 comments)
+2
−0

One option would be to display a message along the lines of:

Search results for user:me can only be displayed when signed in. Please sign in and try again.

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

1 comment thread

Should we strip `user:me` and show those results after (an edited version of) this message? You'd st... (2 comments)
+2
−0

My ideal solution would be to inform the user that search results for user:me require a signed in user in order to know who me refers to, and then show a sign in page that will automatically redirect to the search results once the user has finished signing in.

I understand this would be more development work than simply displaying a message, but since we already have the option of redirecting after signing in for other parts of the site, I mention this as a possible longer term feature.

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

0 comment threads

+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)

Sign up to answer this question »