feat(nestjs): Handle Necord contexts in SentryGlobalFilter - #24326
Open
tiagovilasboas wants to merge 1 commit into
Open
feat(nestjs): Handle Necord contexts in SentryGlobalFilter#24326tiagovilasboas wants to merge 1 commit into
tiagovilasboas wants to merge 1 commit into
Conversation
Fixes getsentry#18472 Co-authored-by: Tiago Vilas Boas <tcarvalhovb@gmail.com>
tiagovilasboas
marked this pull request as ready for review
September 10, 2026 23:27
tiagovilasboas
requested review from
mydea and
s1gr1d
and removed request for
a team
September 10, 2026 23:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Necord Discord handlers use a custom NestJS execution context (
getType() === 'necord'). Those exceptions were falling through to the HTTPBaseExceptionFilterpath, which expects an HTTP adapter and cannot reply to Discord interactions.SentryGlobalFilternow treats Necord the same way as the other non-HTTP branches: capture unexpected errors, skip expected Nest control-flow exceptions, logErrorinstances, and return without delegating to HTTP handling.The mechanism type follows the existing convention (
auto.necord.nestjs.global_filter). Nonecordordiscord.jsdependency is added — context detection is the string Necord already sets on the execution host.Fixes #18472