trending
•

1mo ago

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

A lot has changed across the v1.9.x releases.

  • 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

  • Added missing "jwt" property for "needMappers"

  • Fixed "needMappers" being incorrectly typed as a single string union instead of an array

  • Updated "asyncHandler" to preserve Express generic request types

  • Additional README updates

•

10mo ago

ds-express-errors - Predictable, centralized error handling for Express.js APIs

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, Prisma, Mongoose, 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