Mechanism should default to true unless set explicitly (#1889) · gitcommit90/sentry-python@778fde0 · GitHub
Skip to content

Commit 778fde0

Browse files
authored
Mechanism should default to true unless set explicitly (getsentry#1889)
1 parent 72455f4 commit 778fde0

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

sentry_sdk/utils.py

Lines changed: 2 additions & 1 deletion

tests/integrations/wsgi/test_wsgi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ def dogpark(environ, start_response):
140140
assert error_event["transaction"] == "generic WSGI request"
141141
assert error_event["contexts"]["trace"]["op"] == "http.server"
142142
assert error_event["exception"]["values"][0]["type"] == "Exception"
143+
assert error_event["exception"]["values"][0]["mechanism"] == {
144+
"type": "wsgi",
145+
"handled": False,
146+
}
143147
assert (
144148
error_event["exception"]["values"][0]["value"]
145149
== "Fetch aborted. The ball was not returned."

tests/test_basics.py

Lines changed: 16 additions & 0 deletions

0 commit comments

Comments
 (0)