Opened 7 years ago

Last modified 7 years ago

#27567 closed Bug

Avoid crashes in tecnical exception page/emails when the database is down — at Version 1

Reported by: Andreas Pelme Owned by: Andreas Pelme
Component: Error reporting Version: 1.10
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Andreas Pelme)

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 OperationalErrors. 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.

PR: https://github.com/django/django/pull/7656

Change History (1)

comment:1 by Andreas Pelme, 7 years ago

Description: modified (diff)
Owner: set to Andreas Pelme
Status: newassigned
Note: See TracTickets for help on using tickets.
Back to Top