#29714: Option to hide cookies in error reports
-------------------------------------+-------------------------------------
Reporter: Vasili Korol | Owner: (none)
Type: New feature | Status: new
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: email, reports, | Triage Stage:
cookies | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* version: 1.11 => master
* type: Uncategorized => New feature
Comment:
> There is no information about this in the
[https://docs.djangoproject.com/en/2.1/howto/error-reporting/ Howto].
In the How-To see the [https://docs.djangoproject.com/en/2.1/howto/error-
reporting/#custom-error-reports Custom Error Reports] section.
> If you wish to override or customize this default behavior ... you need
to define your own filter class ...
Something along these lines should do you:
{{{
class CustomExceptionReporterFilter(SafeExceptionReporterFilter):
def get_traceback_data(self):
c = super().get_traceback_data()
if self.is_active(self.request) and 'request_COOKIES_items' in c:
del c['request_COOKIES_items']
return c
}}}
This seems neat enough to me.
You can always ask on django-developers but, I suspect there'd be no
appetite for changing the default filtering behaviour. As such I can't
really see a cleaner API being available (or worth the effort). Given that
I'm going to close this as `wontfix`.
Let me know if I've missed something.
--
Ticket URL: <https://code.djangoproject.com/ticket/29714#comment:1>
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/065.4d8ad626b8a4b96affb2ee4b5f72b3f5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.