Metro-Records / la-metro-councilmatic

:metro: An instance of councilmatic for LA Metro
MIT License
6 stars 2 forks source link

Hidden bills and events raise Internal Server Error, rather than Page Not Found #399

Closed reginafcompton closed 2 years ago

reginafcompton commented 5 years ago

The Metro Councilmatic database includes private bills (marked with "restrict_view=True") and test events. Trying to access one of these entries raises an Internal Server Error.

Example of bill Example of event

It would be better to handle this more gracefully, i.e., with a Page Not Found (404).

I'd classify this as a very low priority issue.

hancush commented 3 years ago

I had to fix this issue on another app this morning! The problem was that I put my 404.html and 500.html templates in a directory like templates/app_name/404.html, but I needed to tell Django to look for them there by adding templates/app_name to my TEMPLATES > DIRS setting: https://github.com/confluency/stormstore-app/blob/master/stormstore_app/settings.py#L94

Maybe that's at play here?

hancush commented 3 years ago

@fatima3558 Update: I don't think my original comment is the problem, as our 404 page does work sometimes, e.g., #747. Let's deprioritize this, for now, and if it stays in the backlog after our meetings next week, let's pair on getting the app running with DEBUG = False and louder logging so you can test locally!