Skip to content
All news
ReleaseAI-written

NestJS 12.6.1 adds RabbitMQ nack option and tightens pipe validation

NestJS 12.6.1 introduces a nackOnInternalError option for RabbitMQ, hardens ParseDatePipe, aggregates errors in ParseArrayPipe, and enhances ConsoleLogger redaction while updating platform adapters.

NestJS 12.6.1 was released on 2026-11-25. The update introduces a RabbitMQ nack option and tightens validation in several built‑in pipes. It also adjusts platform adapters and logger behavior.

The RabbitMQ server now supports a nackOnInternalError option, defaulting to false, which negatively acknowledges handler errors without requeue and routes them to a dead‑letter exchange. A new fanout server mode asserts a fanout exchange named after its queue and binds the queue to it, aborting startup if an exchange of a different type already exists. When Redis, RabbitMQ, Kafka, or gRPC servers close while their client is being created, listen() now fails with the message “Connection closed” instead of starting.

ParseDatePipe has been hardened to reject invalid dates, including unpadded numeric dates, month‑name dates, two‑digit years, and dates with weekday prefixes or unconventional separators. ParseArrayPipe with stopAtFirstError: false now aggregates custom exceptions for every array element instead of aborting after the first error. ParseEnumPipe now prefers an exact string match over numeric coercion, returning '0' as a string when both string and numeric enum values exist.

applyDecorators() now follows TypeScript semantics: a returned descriptor replaces the method, a returned class replaces the class, and parameter decorators receive the parameter index. ConsoleLogger’s redact feature now masks headers, URLSearchParams, FormData entries, URL credentials, and fields of SuppressedError; in JSON mode the redactions are serialized.

On @nestjs/platform-express, multipart fields that attempt to set __proto__ or constructor[prototype] keys in req.body are rejected with a 400 error. Upload limit options supplied as NaN now fall back to their defaults on Express, Node, and Fastify, preventing silent disabling of limits or startup failures. @nestjs/platform-socket.io now refuses clients whose allowRequest check throws or rejects, logging the error instead of propagating to process handlers. @nestjs/platform-fastify upgrades to @fastify/middie 9.3.9, adds middleware to plugins once per request, and requires Node.js 20.19+ or 22.12+ because middie loads the ES module path-to-regexp 9.