Skip to content

Conversation

@ericsampson
Copy link
Contributor

@ericsampson ericsampson commented Nov 22, 2025

Applies the same improvements for GraphQL as in this PR for plain HTTP: #4724

#endif
// Wrap in a new exception to preserve the stack trace when thrown and caught.
// The inner exception will have the full stack trace for better issue grouping.
throw new GraphQLHttpRequestException(errorMessage, exception);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Inner exception missing stack trace on pre-.NET 5

On pre-.NET 5 platforms, the inner exception won't have a stack trace because it's never thrown and SetCurrentStackTrace isn't available. The wrapper exception at line 45 only captures a minimal stack trace from the immediate throw/catch within the same method. To match the HTTP handler pattern, the inner exception should be thrown and caught on pre-.NET 5 platforms before wrapping, similar to the try-catch pattern used in SentryHttpFailedRequestHandler.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant