Skip to content

ref(graphene): Simplify span creation

da6bc1f
Select commit
Loading
Failed to load commit list.
Merged

ref(graphene): Simplify span creation #5648

ref(graphene): Simplify span creation
da6bc1f
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Mar 12, 2026 in 1m 8s

1 issue

find-bugs: Found 1 issue (1 medium)

Medium

Span error status not set when GraphQL operation raises exception - `sentry_sdk/integrations/graphene.py:155`

The __exit__(None, None, None) call always passes None for exception info regardless of whether an exception occurred during the GraphQL operation. The Span's __exit__ method checks if value is not None and should_be_treated_as_error(ty, value) to set SPANSTATUS.INTERNAL_ERROR, but since value is always None, exceptions during GraphQL operations will not mark the span as errored. This causes incorrect telemetry where failed operations appear successful.


Duration: 1m 5s · Tokens: 217.0k in / 2.6k out · Cost: $0.28 (+extraction: $0.00, +fix_gate: $0.00)

Annotations

Check warning on line 155 in sentry_sdk/integrations/graphene.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: find-bugs

Span error status not set when GraphQL operation raises exception

The `__exit__(None, None, None)` call always passes None for exception info regardless of whether an exception occurred during the GraphQL operation. The Span's `__exit__` method checks `if value is not None and should_be_treated_as_error(ty, value)` to set `SPANSTATUS.INTERNAL_ERROR`, but since value is always None, exceptions during GraphQL operations will not mark the span as errored. This causes incorrect telemetry where failed operations appear successful.