basxsoftwareassociation / bread

Engine to create database applications based on Django and the IBM Carbon Design System
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

Add 5XX and 4XX status pages for production #35

Closed saemideluxe closed 2 years ago

saemideluxe commented 3 years ago

We should have a nice 4XX page for production.

Also the 5XX page is necessary IMHO. In general it is not recommended to show too much error information to the user on a production system due to security issues (revealing paths, versions and code). However, I think that a sensible 5XX page with the stacktrace would be a better user experience. The standard plain 500 page leaves users very confused. Showing the stack-trace end the exception will make it more clear that something is not right and we are more likely to get a screenshot with usefull debug information on first contact. But in any case I would limit this to authenticated users.

Further information about this can be found in the Django docs: https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views

saemideluxe commented 2 years ago

Edit: Do not show the stack-trace, only the exception message.

dward2nd commented 2 years ago

Done #117