#27567: Avoid crashes in tecnical exception page/emails when the database is
down
-------------------------------------------+------------------------
Reporter: Andreas Pelme | Owner: (none)
Type: Bug | Status: new
Component: Error reporting | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
The technical 500 debug view and admin email shows the currently logged in
user.
However, if the database is shutting down or is unavailable, anything that
involves the ORM raises `OperationalError`s. Turning `request.user` into a
string in the template rendering will cause and exception which will cause
the rendering to crash. Crashes in the error reporting itself cause hard
to debug problem which can be hard to follow (especially for beginners).
I propose that we should catch exceptions when retrieving the user details
and state that the user could not be shown while still showing everything
else.
I have created a patch that fixes this issue, I will add a link to the PR
shortly.
--
Ticket URL: <https://code.djangoproject.com/ticket/27567>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.413208b807cd52b7d0d542887061b3a5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.