#23002: handle_uncaught_exception: add support for debug=True kwarg / factor
request.error logging out
-------------------------------------+-------------------------------------
Reporter: blueyed | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Core (Other) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by blueyed):
> replace `return technical_500_response(request, *exc_info)` with
something like `return BaseHandler().handle_uncaught_exception(request,
resolver, exc_info, debug=True)`?
Yes.
> That still wouldn't achieve the same thing as your last snippet as
SafeExceptionReporterFilter checks settings.DEBUG.
I see.
From what I understand it would apply filtering, which does not happen
with `settings.DEBUG`?
I would consider this to be a good thing in this context, i.e. the
sensitive information in the technical info should be filtered.
> I think you should instead use a custom
`settings.DEFAULT_EXCEPTION_REPORTER_FILTER` and subclass
`django.views.debug.SafeExceptionReporterFilter` overriding the `is_safe`
method with the same condition as in your middleware.
Without `settings.DEBUG` this won't return `debug.technical_500_response`
though?
Or did you mean "additionally" instead of "instead", i.e. to get the same
behavior (filtering) as with `settings.DEBUG`?
--
Ticket URL: <https://code.djangoproject.com/ticket/23002#comment:2>
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.b95d6b586a31f51487a9bdd5c1888ae6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.