We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a27102 commit 9ee1b86Copy full SHA for 9ee1b86
posthog/integrations/django.py
@@ -1,5 +1,5 @@
1
from typing import TYPE_CHECKING, cast
2
-from posthog import contexts
+from posthog import contexts, capture_exception
3
from posthog.client import Client
4
5
if TYPE_CHECKING:
@@ -167,3 +167,15 @@ def __call__(self, request):
167
contexts.tag(k, v)
168
169
return self.get_response(request)
170
+
171
+ def process_exception(self, request, exception):
172
+ if self.request_filter and not self.request_filter(request):
173
+ return
174
175
+ if not self.capture_exceptions:
176
177
178
+ if self.client:
179
+ self.client.capture_exception(exception)
180
+ else:
181
+ capture_exception(exception)
0 commit comments