Skip to content

Commit 6c9bba3

Browse files
make adding query more robust
1 parent 7b7b9d1 commit 6c9bba3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentry_sdk/integrations/graphene.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ def _event_processor(event, hint):
106106
if should_send_default_pii():
107107
request_info = event.setdefault("request", {})
108108
request_info["api_target"] = "graphql"
109-
request_info.setdefault("data", {})["query"] = source # type: ignore
109+
if isinstance(source, str):
110+
request_info.setdefault("data", {})["query"] = source # type: ignore
110111

111112
elif event.get("request", {}).get("data"):
112113
del event["request"]["data"]

0 commit comments

Comments
 (0)