Skip to content

Commit

Permalink
fix(wsgi): Dont crash when trying to build URL for request
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Nov 30, 2018
1 parent 66ffc91 commit 30d6a38
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sentry_sdk/integrations/_wsgi_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ def extract_into_event(self, event):

content_length = self.content_length()
request_info = event.setdefault("request", {})
request_info["url"] = self.url()
try:
request_info["url"] = self.url()
except Exception:
# Django sometimes crashes with KeyError trying to build an
# absolute URL
pass

if _should_send_default_pii():
request_info["cookies"] = dict(self.cookies())
Expand Down

0 comments on commit 30d6a38

Please sign in to comment.