ds-express-errors

ds-express-errors

Centralized error management for Express.js

dianastoyka
@dianastoyka
Last updated on Aug 24, 2026
Visit site
41 PeerPush
🔥
Awarded
Trending Now
PeerPush

Details

Follow on
LinkedIn
Categories
Developer Tools
Platforms
Web

Discovery signals

How AI and people discover ds-express-errors on PeerPush

PersistenceRead streakConsecutive days, counting back from today, that AI has read this listing every single day.
14 days

Read by AI every day

Read by AI every day for the last 14 days.
MCP citations all-timeMCP citationsHow often AI tools pulled this listing through MCP, and its typical position in those results.
6 pulls

Top 4 in MCP results

AI tools pulled this listing via MCP, typically in the top 4 results.

About ds-express-errors

ds-express-errors is an open source library for standardizing error handling in Express.js applications. It provides a centralized error handling middleware, ready to use HTTP error presets, automatic error mapping, customizable response formatting, logging, graceful shutdown utilities, and TypeScript support. The library includes HTTP error presets covering the most common 4xx and 5xx status codes. When these are not enough, the AppError base class allows creating custom application errors with any HTTP status code while remaining fully compatible with the error handler. Automatic error mapping converts errors from popular libraries into consistent HTTP responses. Supported integrations include Prisma, Sequelize, Mongoose, Zod, Joi, express-validator, JWT, and native JavaScript errors such as TypeError, ReferenceError, and SyntaxError. Production responses are sanitized while development responses preserve detailed debugging information. The library follows a zero runtime dependency philosophy. By default it recognizes supported errors using duck typing, eliminating the need to install additional packages. Projects that require stricter validation can enable instanceof checks by passing their own library classes through the errorClasses configuration. Every part of the behavior can be customized. You can define your own response format, replace or extend built in mappers, enable only selected mappers, configure development environments, integrate custom loggers such as Winston or Pino, or use the built in logger with rate limiting. The package also provides asyncHandler for asynchronous controllers, optional global handlers for uncaughtException and unhandledRejection, graceful HTTP shutdown helpers, configurable development and production behavior, and full TypeScript definitions. The goal of the library is to provide consistent, predictable, and maintainable error handling for Express.js applications while remaining lightweight, dependency free, and fully configurable.

Screenshots

Screenshot 1 of ds-express-errors
Screenshot 2 of ds-express-errors
Screenshot 3 of ds-express-errors
Screenshot 4 of ds-express-errors
Screenshot 5 of ds-express-errors
Screenshot 6 of ds-express-errors
Screenshot 7 of ds-express-errors
Screenshot 8 of ds-express-errors
Screenshot 9 of ds-express-errors

Product Updates (2)

dianastoyka
@dianastoyka

ds-express-errors — v1.9.x Update

A lot has changed since the last PeerPush update. - Added stricter and more accurate Prisma & Sequelize error detection - Added configurable "errorClasses" support for Prisma and Sequelize - Improved Sequelize connection error mapping - Improved production-safe error responses across Zod, Joi, express-validator, Mongoose, Prisma, Sequelize, and JWT - Added separate JWT error handling to prevent sensitive details from leaking in production - Improved TypeScript definitions and fixed several missing types - Fixed ESM imports and Prisma initialization error detection - Improved development logs and expanded test coverage - Updated documentation around configuration, "NODE_ENV", library errors, and mapper behaviour The current release is v1.9.2.

Product had at the time: 6 upvotes • 5 comments • 5 followers • 1 PeerPush

Comments (1)

dianastoyka
@dianastoykaAug 24, 2026

https://youtu.be/b2ILzdZei3w?is=TrxUzUqzAXwIxRil There is also video introduction, which shows library core functions

dianastoyka
@dianastoyka

ds-express-errors — v1.8.0 & v1.8.1 Release Notes

Added support for user-provided error classes in custom mappers (Zod, Joi). Added the ability to enable only selected mappers via configuration, reducing unnecessary checks. Added rate limiting for the logger. Fixed incorrect logic in the express-validator mapper. Expanded supported Prisma errors: P2005, P2006, P2007, P2011, P2027. Improved validation logic for mongoose and sequelize mappers. Version 1.8.1 — January 12, 2026 Fixed missing API import for logDebug. Added maxLoggerRequests configuration option to limit the maximum number of log requests per minute (default is 100). Added BigInt handling to the internal safeStringify method. Fixed incorrect HTTP status codes in mongoose and sequelize mappers. Refactored logger logic for customLogger. Added Errors.GatewayTimeout(message). Fixed Sequelize mapping for the following errors: SequelizeOptimisticLockError, SequelizeEmptyResultError, SequelizeDatabaseError, SequelizeConnectionError, SequelizeTimeoutError.

Product had at the time: 2 upvotes • 0 comments • 2 followers • 1 PeerPush

Comments (1)

olli
@olliMar 6, 2026

🚀🚀

Reviews (0)

No reviews yet. Be the first to rate this product!

Comments (3)

olli
@olli

Nice one!