Opened 11 months ago

Last modified 11 months ago

#27785 new New feature

Log request.body (or part of it) in the 500 debug content

Reported by: Claude Paroz Owned by:
Component: Error reporting Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have a use case where a server error happens due to some unexpected content coming from the request.body content. Unfortunately, the debug view currently doesn't output anything related to request.body. It should probably be trimmed at some point (4Ko for example), and the ability to filter the output could be added with a new method of ExceptionReporterFilter. If undecodable, a simple output like <Undecodable bytes> could be output.

Change History (1)

comment:1 Changed 11 months ago by Tim Graham

Triage Stage: UnreviewedAccepted

I wonder if django rest framework does anything related that could be worth borrowing from.

Note: See TracTickets for help on using tickets.
Back to Top