ds-express-errors

ds-express-errors

Centralized error management for Express.js

dianastoyka
@dianastoyka
Last updated on Jan 12, 2026
Visit site
5 PeerPush
🔥
Awarded
Trending Now
PeerPush

Details

Follow on
LinkedIn
Platforms
Web

About ds-express-errors

ds-express-errors provides a single, predictable error-handling strategy for Express.js APIs, replacing scattered try/catch blocks and inconsistent responses. It automatically maps errors from tools like Zod, Joi, express-validator, Prisma, Mongoose, Sequelize, and JWT into proper HTTP errors with consistent JSON output. Everything is fully configurable — response shape, logging, environments, and custom error mapping. Built for production with async handling, process-level guards, graceful shutdowns, and full TypeScript support

Product Insights

This open-source web library standardizes error management in Express.js by mapping data from multiple ORMs and validation tools into uniform HTTP responses. It provides backend developers with process-level guards and configurable logging for production environments.

  • Native integration with Zod, Joi, Prisma, Mongoose, and Sequelize for automatic error mapping.
  • Built-in async handling and process-level guards to prevent server crashes and manage shutdowns.
  • Highly configurable response shapes, logging rate limits, and environment-specific behaviors.
  • Full TypeScript support ensures type safety across custom error classes and mappers.

Ideal for: Backend Developers and Open Source Maintainers who need to implement centralized, type-safe error handling across diverse Express.js API tech stacks.

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

Product Updates (1)

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!