Skip to content

feat(nestjs): Gracefully handle RPC scenarios in SentryGlobalFilter #16066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

chargome
Copy link
Member

@chargome chargome commented Apr 15, 2025

EDIT:

Circled back on the approach of adding a SentryRpcFilter :

  • The error in the linked issue is not Sentry specific, but rather surfaced because we added a global exception filter in a hybrid application (http + microservices) – which means every rpc error reached our SentryGlobalFilter which then tried to handle RpcExceptions in a http manner. This is why we got this weird error.
  • Instead I updated SentryGlobalFilter to more gracefully handle these scenarios and add a warning log that users should provide their own RrcException filter – will also update this in docs.

closes #16051

@chargome
Copy link
Member Author

Had to circle back on this approach - see the updated pr description

@chargome chargome changed the title feat(nestjs): Add SentryRpcFilter for handling microservice contexts feat(nestjs): Gracefully handle RPC scenarios in SentryGlobalFilter Apr 17, 2025
@chargome chargome requested a review from Lms24 April 17, 2025 12:25
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.

NestJS Microservice: response.status is not a function
2 participants