Urgent.News

650+ sources. One page. See who else covered it.

Editions

Tech

NestJS Error Capture: Tracking HTTP Exceptions Through Filter and Interceptor Boundaries

For a production logistics agent, error tracking should use one failure envelope at every execution boundary, then attach cost and latency before the boundary reports or rethrows the failure. An HTTP exception filter alone cannot do that job: scheduled route refreshes and queue-driven shipment checks never enter the HTTP pipeline. The operational recommendation is to keep framework adapters thin,…

The article discusses the challenges of error tracking in NestJS, specifically in capturing HTTP exceptions, cron jobs, and queue workers. It recommends treating each execution boundary (HTTP requests, cron invocations, and queue deliveries) as separate entities feeding into the same internal recorder. The HTTP interceptor should establish timing and correlation context around controller execution, while the exception filter translates uncaught HTTP-path failures into a shared envelope and preserves the response contract.

A cron wrapper creates a fresh execution context, and a queue-worker wrapper starts from message metadata, records the current delivery attempt, and rethrows to allow the queue system to decide on retry or dead-lettering. The error tracking envelope should separate bounded dimensions from searchable detail, with fields such as boundary, operation, outcome, and low-cardinality error class being useful for SLO aggregation.

The article emphasizes the importance of preserving causal links between processes and avoiding assumptions about request-local state crossing asynchronous handoffs.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Qdrant Recall Inconsistency: It Took 300 Test Runs to Discover the Index Wasn't Refreshed

At 2 AM, a user reported that the AI Agent suddenly forgot details of a project we discussed yesterday. I groggily opened Grafana and saw the memory recall rate had dropped from 98% to 60%.

  • AI Agent forgot project details, memory recall rate dropped from 98% to 60%
  • Qdrant writes and queries have time gap, causing intermittent failures
  • Qdrant's write and index building are asynchronous, leading to empty or partial results

More from Sunday 16 August →