From 0935b9b65b77828014ec587b696521e8740c87a7 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 9 Aug 2018 20:15:47 +0200 Subject: [PATCH] fix: Revert exception handling for raw wsgi errors --- sentry_sdk/integrations/django.py | 6 +----- tests/integrations/django/test_basic.py | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sentry_sdk/integrations/django.py b/sentry_sdk/integrations/django.py index 424ff0b4f7..c0903f71d9 100644 --- a/sentry_sdk/integrations/django.py +++ b/sentry_sdk/integrations/django.py @@ -45,11 +45,7 @@ def sentry_patched_get_response(self, request): lambda: make_event_processor(request) ) - try: - return old_get_response(self, request) - except Exception as e: - capture_exception() - raise e + return old_get_response(self, request) BaseHandler.get_response = sentry_patched_get_response diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index a99f924926..e0cd425074 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -74,3 +74,8 @@ def test_user_captured(client, capture_events): "ip_address": "127.0.0.1", "username": "john", } + + +def test_404(client): + response = client.get("/404") + assert response.status_code == 404