Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 96f6c3c

Browse files
committed
Also use Django’s default exception handlers
1 parent cc77c89 commit 96f6c3c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

twilio_notifications/middleware.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from django.conf import settings
66
from django.core.exceptions import ImproperlyConfigured
7-
from django.http import HttpResponse
87
from dotenv import load_dotenv
98
from twilio.rest import Client
109

@@ -84,6 +83,4 @@ def process_exception(self, request, exception):
8483
self.client.send_message(message_to_send, admin['phone_number'])
8584

8685
logger.info('Administrators notified!')
87-
return HttpResponse(
88-
"An error occured. Don't panic! Administrators are notified."
89-
)
86+
return None

0 commit comments

Comments
 (0)