
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@wthek/nestjs-middleware
Advanced tools
NestJS middleware for handling and formatting errors using http-error-kit. Automatically detects and supports both Express and Fastify-based NestJS apps to ensure structured error responses with correct HTTP status codes.
http-error-kit
Seamless NestJS Error Handling with @wthek
Built for applications powered by http-error-kit, this middleware ensures that all http-error-kit
errors are properly formatted and returned with the correct HTTP status codes.
💡 What the HEK?! Need a hassle-free way to manage error responses for
http-error-kit
errors in NestJS?@wthek/nestjs-middleware
has got you covered!
✅ Supports both Express and Fastify underlying NestJS apps out of the box.
http-error-kit
Extension – The recommended middleware for NestJS apps.npm install @wthek/nestjs-middleware
Add Middleware Just Before Starting the Server
To catch all errors correctly, place KitNestJsMiddleware(app)
in main.ts
file before starting the NestJS server.
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { KitNestJsMiddleware } from '@wthek/nestjs-middleware';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
KitNestJsMiddleware(app);
await app.listen(process.env.PORT ?? 3000);
}
bootstrap();
http-error-kit
Errors@wthek/nestjs-middleware
?http-error-kit
– Fully compatible with existing http-error-kit
error structures.The WTHek ecosystem continues to grow with new extensions to simplify error handling across various frameworks and libraries. Stay updated with the latest tools that integrate seamlessly with http-error-kit
.
Check out the official list of extensions: Official Extensions List
The original author of the project is Himanshu Bansal
This is all voluntary work, so if you want to support my efforts you can
You can also use the following:
@wthek/nestjs-middleware
project is open-sourced software licensed under the MIT license by Himanshu Bansal.
FAQs
NestJS middleware for handling and formatting errors using http-error-kit. Automatically detects and supports both Express and Fastify-based NestJS apps to ensure structured error responses with correct HTTP status codes.
The npm package @wthek/nestjs-middleware receives a total of 1 weekly downloads. As such, @wthek/nestjs-middleware popularity was classified as not popular.
We found that @wthek/nestjs-middleware demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.