Skip to content

fix(node): report NestJS controller exceptions + full request URL (#920, #921) - #927

Merged
unjica merged 5 commits into
developfrom
fix/tt-035-036-nest-exceptions
Nov 4, 2026
Merged

unjica merged 5 commits into
developfrom
fix/tt-035-036-nest-exceptions

Conversation

@unjica

@unjica unjica commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Base branch: develop

Summary

Closes #920
Closes #921

How to test

  • Regression tests: packages/telemetry-node/src/nest.test.ts boots a real Nest 11 + Express app: sync and async controller throws → 500 body unchanged and one /ingest/error with context; 404 NotFoundException unchanged and not reported; 200 passthrough; Nest middleware $request.url = /qa/ok?x=1; plain req.url fallback; captureNestException never throws. Verified the 3 regression tests fail without the fix.
  • Node pnpm test now runs tsc -p tsconfig.test.json (compile check: NestInterceptor / ArgumentsHost assignability).
  • pnpm lint, pnpm test, pnpm -r run build, committed dist matches build: pass.
  • Production build against prod (QA project, packed node 1.5.0): Nest 12 scaffold, nest build OK, 4 runs: /boom and /boom-async → 500 and reported (previously 0/4); /handled (trackError + rethrow) reported once (dedupe); /http404 404 not reported; $request.url /identify?u=… (previously /?u=…); unhandledRejection still reported + exit. Read back via the dashboard errors API.

Checklist

  • Tests pass
  • Lint passes
  • Build succeeds
  • CHANGELOG.md updated under [Unreleased]
  • Documentation updated
  • No breaking changes

Security / privacy

Error context records the path without the query string. $request.url now carries the full original URL (as plain Express already did).

@unjica

unjica commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

QA (QA / Product Reliability): PASS for #920 / #921. CI green after tracking dist/nest.js. Local: lint, all workspace tests (incl. new tsc check against NestInterceptor/ArgumentsHost), build, dist matches. Prod run against the QA project with packed node 1.5.0 on a Nest 12 scaffold (nest build OK), 4 runs: /boom and /boom-async → 500 unchanged and reported (were 0/4); trackError+rethrow reported once; 404 HttpException unchanged and not reported; $request.url = full originalUrl (e.g. /identify?u=…, was /?u=…); unhandledRejection still reported + exit. Read back via the dashboard API. Refs #920, Refs #921

@unjica
unjica merged commit d1df35d into develop Nov 4, 2026
7 checks passed
@unjica unjica mentioned this pull request Nov 4, 2026
2 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant