Skip to main content

handle_uncaught_exception

Processing for any otherwise uncaught exceptions (those that will generate HTTP 500 responses).

def handle_uncaught_exception(
request: HttpRequest,
resolver: URLResolver,
exc_info: tuple
) - > HttpResponse

Processing for any otherwise uncaught exceptions (those that will generate HTTP 500 responses).

Parameters

NameTypeDescription
requestHttpRequestThe current web request object being processed when the exception occurred
resolverURLResolverThe URL resolver used to locate the custom error handler for 500 status codes
exc_infotupleA tuple containing the exception type, value, and traceback as returned by sys.exc_info()

Returns

TypeDescription
HttpResponseA response object containing either a technical debug page or a friendly error message from the resolved 500 error handler.