You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TT-035: NestJS unhandled controller exceptions (500 from Nest's exception filter) are never reported; docs say global process handlers cover uncaught failures #920
TT ID: TT-035 · Severity: P2 · Area: SDK / Docs (NestJS) · Found by: QA (weekly deep test, other integrations) · Production: API v1.22.25 · SDK: @telemetry-tracker/node 1.4.2 / core 1.5.3 (npm) · NestJS 12.3.2
Summary
The NestJS guide says "Global process handlers cover uncaught failures." Unhandled exceptions thrown in controllers/services during a request never reach uncaughtException/unhandledRejection. Nest's built-in BaseExceptionFilter catches them, logs them, and returns 500 Internal server error. So the most common backend failure in a Nest app (a route that throws) is never reported unless the developer adds trackError() by hand.
Steps to reproduce
nest new my-nest-api (Nest 12), npm i @telemetry-tracker/node. Follow /docs/nestjs exactly: init() in main.ts before NestFactory.create, plus the TelemetryMiddleware with forRoutes("*").
Add routes: GET /boom → throw new Error("boom"); GET /boom-async → async handler that throws after await.
Call each route. Both return HTTP 500, and the Nest logger prints ERROR [ExceptionsHandler] ....
Check Issues / GET /api/errors?range=24h.
Expected
Route exceptions that end in a 500 are reported (or the docs state clearly that they aren't and show the filter to add).
Actual
0 errors reported for /boom and /boom-async across 4 runs (r1, r2, crash1, crash2). No /ingest/error request is sent.
Controls in the same app are reported: the docs "Handled errors" trackError() example (1 per run), a real unhandledRejection from a detached promise, and an uncaughtException from a setTimeout throw. The last two are reported, and then the process exits.
Activity
Merge pull request #927 from Telemetry-Tracker/fix/tt-035-036-nest-ex…