Skip to content

Commit

Permalink
fix: Revert exception handling for raw wsgi errors
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Aug 9, 2018
1 parent 523d6cb commit 0935b9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions sentry_sdk/integrations/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions tests/integrations/django/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0935b9b

Please sign in to comment.