Page MenuHomePhabricator

Don't show a fatal error to users that aren't logged in
Closed, ResolvedPublic

Description

If you access EventMetrics with a URL and you are not logged in (don't have a valid session), you receive a fatal error.

Example: https://eventmetrics.wmflabs.org/programs/1/events/47/revisions?format=wikitext

We should catch the user that's not logged in and redirect to / or something that helps the user. Ideally, we'd show a message like, "You must be logged in to see that page, please log in." After logging in, the user would be redirected to the page in the original request.

Event Timeline

aezell added a subscriber: MusikAnimal.

@MusikAnimal fixed this as I was writing the task.

Thanks!

MusikAnimal changed the task status from Invalid to Resolved.Dec 17 2018, 11:24 PM

My mistake! After deploying 47ec13b I forgot to update production's parameters.yml, which is why we were getting that error. The behaviour you suggest is what it does now that I've fixed it :) It does not redirect back to the original target after logging in, though. For that there's T187934