Error HandlerIntroduction
Introduction
Global error handling middleware for Node.js applications with customizable formatting and logging.
Last updated:
@visulima/error-handler
Production-ready error handling middleware for Node.js applications with customizable error formatting, logging, and HTTP response generation.
Key Features
- HTTP error responses
- Error logging integration
- Custom error formatters
- Stack trace filtering
- Production/development modes
Quick Start
import { createErrorHandler } from "@visulima/error-handler";
const errorHandler = createErrorHandler({
debug: process.env.NODE_ENV !== "production",
});
app.use(errorHandler);