Undocumented
Function | convert_exception_to_response |
Wrap the given get_response callable in exception-to-response conversion. |
Function | get_exception_response |
Undocumented |
Function | handle_uncaught_exception |
Processing for any otherwise uncaught exceptions (those that will generate HTTP 500 responses). |
Function | response_for_exception |
Undocumented |
Wrap the given get_response callable in exception-to-response conversion.
All exceptions will be converted. All known 4xx exceptions (Http404, PermissionDenied, MultiPartParserError, SuspiciousOperation) will be converted to the appropriate response, and all other exceptions will be converted to 500 responses.
This decorator is automatically applied to all middleware to ensure that no middleware leaks an exception and that the next middleware in the stack can rely on getting a response instead of an exception.