Skip to content

ref(graphene): Simplify span creation

da6bc1f
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

ref(graphene): Simplify span creation #5648

ref(graphene): Simplify span creation
da6bc1f
Select commit
Loading
Failed to load commit list.
GitHub Actions / warden: find-bugs completed Mar 12, 2026 in 44s

1 issue

find-bugs: Found 1 issue (1 medium)

Medium

Span exit ignores exception info, preventing error status from being set - `sentry_sdk/integrations/graphene.py:155`

The __exit__(None, None, None) call in the finally block always passes None for the exception arguments, even when an exception occurs during the yield. The Span.__exit__ method (lines 396-406 in tracing.py) checks if value is not None to set INTERNAL_ERROR status on the span. Since value is always None, GraphQL errors will not be reflected in the span's status.


Duration: 43.8s · Tokens: 68.8k in / 1.5k out · Cost: $0.21 (+extraction: $0.00)

Annotations

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

See this annotation in the file changed.

@github-actions github-actions / warden: find-bugs

Span exit ignores exception info, preventing error status from being set

The `__exit__(None, None, None)` call in the `finally` block always passes `None` for the exception arguments, even when an exception occurs during the `yield`. The `Span.__exit__` method (lines 396-406 in `tracing.py`) checks if `value is not None` to set `INTERNAL_ERROR` status on the span. Since `value` is always `None`, GraphQL errors will not be reflected in the span's status.