diff --git a/django/core/handlers/exception.py b/django/core/handlers/exception.py index 3fe6e4d3dd9..66443ce5601 100644 --- a/django/core/handlers/exception.py +++ b/django/core/handlers/exception.py @@ -102,12 +102,12 @@ def response_for_exception(request, exc): return response -def get_exception_response(request, resolver, status_code, exception, sender=None): +def get_exception_response(request, resolver, status_code, exception): try: callback, param_dict = resolver.resolve_error_handler(status_code) response = callback(request, **{**param_dict, 'exception': exception}) except Exception: - signals.got_request_exception.send(sender=sender, request=request) + signals.got_request_exception.send(sender=None, request=request) response = handle_uncaught_exception(request, resolver, sys.exc_info()) return response diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt index dc5bfd943b9..67baca911e1 100644 --- a/docs/ref/signals.txt +++ b/docs/ref/signals.txt @@ -547,7 +547,7 @@ This signal is sent whenever Django encounters an exception while processing an Arguments sent with this signal: ``sender`` - The handler class, as above. + Unused (always ``None``). ``request`` The :class:`~django.http.HttpRequest` object.