🧪 Feedback (developer/tester) #101
Replies: 12 comments 11 replies
|
Library version tested: ds-express-errors v1.9.0 I'd actually split that: the library itself is a 9, the documentation is closer to a 6. Everything I hit went wrong in the docs, not in the code. What I built A small Express + TypeScript API with five routes, each designed to trigger a different path through the error handler: a NotFound preset, a Zod validation failure, an unmapped throw inside asyncHandler, an unmapped throw in a synchronous handler, and a catch-all 404. Source: https://github.com/guilherme-teixeira-gomes/teste-ds-express-errors I came to this with a specific bias: I maintain a hand-rolled centralized error handler in my own project, mapping ZodError, Postgres constraint codes and a domain error class. So I was reading this as "would I delete my own code for this." What worked The zero-dependency claim is real — I checked, dependencies is empty. That matters more to me than bundle size. Every transitive dependency is attack surface I didn't choose, and the supply-chain incidents of the last few years all came through packages nobody deliberately installed. A library I can audit in one sitting is worth a lot. It ships its own index.d.ts, so no separate @types package. tsc --noEmit with strict: true passed clean against my whole test app — no casts, no any leaking in from the middleware signature. The "type-safe" claim holds up. Errors.NotFound(...) reads better than remembering that not-found is 404. Small thing, but the kind that compounds across a codebase. Unmapped errors became 500 without taking the process down, in both the async and the sync handler. Worth noting the sync case works even though asyncHandler doesn't wrap it — that surprised me in a good way. The server log is genuinely well designed. Timestamp, method, route, message, status, and Operational: true/false. That last flag is the useful one: in production it's the difference between "a user sent bad input" and "wake someone up." I'd have expected to build that distinction myself. Three problems
The "Handling 404" section shows: ```js app.use('*', (req, res, next) => { ... }) ```
With express@5 — what npm install express gives you today — that throws before the server ever listens: PathError: Missing parameter name at index 1: * path-to-regexp no longer accepts a bare '*'. Dropping the path entirely fixes it. This was the first error I hit, and it's the worst kind: someone following the docs on a fresh project can't start their app, and the error points at path-to-regexp, not at anything they wrote.
js next is used but not in the parameter list — ReferenceError at runtime. And there's an extra closing paren at the end. Copy-paste doesn't work.
This one cost me the most time. Running with tsx watch and no NODE_ENV set, a Zod failure returned: json I assumed the Zod 4 mapper was broken — the docs promise "Validation error: email: Invalid email". I was about to write it up as a bug. With NODE_ENV=development: json Zod 4 works perfectly. The docs only say that "url, stack, method are available in development mode" — they don't say the message itself collapses. I'd argue these are two different concerns. Hiding stack and internal paths in production is correct. But which field failed validation is the client's own input — that's not a leak, and stripping it means an API consumer gets a 400 with no idea what to fix. At minimum the behaviour needs documenting, with a setConfig example showing how to change it. Would I use it? In a new project, yes — without hesitation. Mongoose duplicate-key handling alone is something I've written by hand more times than I want to count, and getting Prisma, JWT and Zod in the same package for zero dependencies is a good trade. In my existing project, probably not, and not because of the library. I already have a handler with tests, and its response shape is what my frontend expects. Migrating would be work with no user-visible benefit. That's a "when you adopt it" answer, not a quality judgement. What would move it to a 10 Fix the two broken examples. Document the NODE_ENV behaviour, or split message detail from stack exposure. Add one TypeScript example — "type-safe" is the first thing the homepage claims, and there isn't a single line of TS in Installation or Usage. And the Installation page renders "Current latest version:" with nothing after it. Also: the only per-technology page is the Mongoose example. Zod and Prisma are advertised on the homepage and don't have one. As a Prisma + Zod user I had to work mine out from the API reference. None of that is deep. It's an afternoon of documentation work on a library that already does the hard part correctly. Disclosure: I received money compensation for independently testing ds-express-errors and providing my honest feedback. Payment was not dependent on whether my review was positive or negative. |
|
Library version tested: ds-express-errors v1.9.0 I built a small player and guilt management api with minimal business logic. Find it at: https://github.com/HaileabT/player-guilds Good SideDocumentation is short, easy to understand and not overwhelming like most libraries I try to use. It has good amount of configuration with zero initial configuration. Package size being small and the package not having zero dependencies is I also one that I have noticed is very strong point.
I have tested edge cases such as throwing weird errors, calling the Things I think Could Use Some Improvement
I personally found it very easy to use and it is a strong tool. I would use it in the future projects if the maintenance continues to be this active.
I think it would, but it should include the log level configuration built in without needing a logging library to handle it. Disclosure: I received money compensation for independently testing ds-express-errors and providing my honest feedback. Payment was not dependent on whether my review was positive or negative. |
|
ds-express-errors v1.9.1 — developer review Stack tested: Node.js + Express 5 + TypeScript + Mongoose Overall rating: 7/10 Developer experience level: Mid-level I built a small Express 5 + TypeScript API with a Mongoose Installation and initial setup were painless — one package, no peer dependency headaches, and dropping Finding the docs was easy (the README links straight to ds-express-errors.dev), but I did have to hunt a bit to understand which config option controlled strict vs. duck-typed error detection — Two real TypeScript bugs I ran into, both reproducible:
Both are easy fixes (just missing entries in the On the Mongoose side specifically: worth noting for other Mongoose users that there's no One gap that isn't really the library's fault but bit me anyway: there's no built-in "not found" middleware, so you write your own catch-all route and call What worked well: the preset API ( Would I use it in production? With the two TS typing bugs fixed, yes — for a Node/Express API not already invested in a hand-rolled error-handling layer, this removes real boilerplate and the mapping coverage (Mongoose, Prisma, Sequelize, Zod, Joi, JWT, express-validator) is broader than most alternatives I've used. As it stands today, I'd hold off on a strict-mode TypeScript project until the Disclosure: I received monetary compensation for independently testing ds-express-errors and providing my honest feedback. Payment was not dependent on whether my review was positive or negative. |
ds-express-errors v1.9.1 — developer review
What I testedI integrated the library into an existing TypeScript CRUD API rather than a single demo route. The application has Zod request validation, Drizzle/ The integration exercised:
I did not install Prisma, Mongoose, Sequelize, Joi, JWT, or express-validator just to increase the feature count, so I am not making claims about those integrations. What worked well1. The main integration is small and composableRegistering one final error middleware and throwing Incremental adoption was straightforward: I could introduce the handler and presets first, then add Zod detection, pino, the PostgreSQL mapper, and shutdown handling independently. The docs support that path well in the installation and usage sections. 2. Custom mappers solve real application gapsDrizzle/
The custom mapper runs before built-in mappers, as documented. This let one mapper cover create and update operations without duplicating database-error catches in the service layer. Extensibility felt right: enough override surface without forcing a framework-wide abstraction. 3. The package is lightweight and works in a strict ESM projectThe zero-dependency claim is accurate for v1.9.1. Imports worked with NodeNext/ESM, all exported APIs used by the project type-checked, and the application compiled in strict mode. 4. The normal shutdown path workedOn the happy path, 5. Docs discoverability and playgroundThe getting-started flow was easy to follow, and the site makes the major capabilities discoverable. The playground is a useful way to inspect response behavior quickly. Findings and improvements1. Production Zod responses discard the useful part of validationZod errors correctly map to HTTP 400. In development, the response identifies fields and messages: {
"status": "fail",
"message": "Validation error: title: Invalid input: expected string, received undefined",
"method": "POST",
"url": "/todos"
}For the same schema failure in production, the response becomes: {
"status": "fail",
"message": "Validation error: validation error"
}Hiding the stack, method, and URL in production is correct. Replacing every Zod issue — including application-authored messages such as I would keep debug fields private but surface 2. The Zod mapper flattens only the top-level
|
|
Tested against ds-express-errors v1.9.1 Stack: Node.js 24 | Express 4.19 | sequelize-typescript 2.1.6 | TypeScript 5.5.3 Experience level: Beginner Score: 7/10 I liked the duck-typed vs strict mode in I tested against I use code structure similar to this ds-express-errors-integration in production. I have integrated this lib into the repo. I replaced my own Check lines: Completely replaced my shutdown mechanism with Specific error classes can be used as well with Improvements
sequelizeMapper
** Disclosure: I received money compensation for independently testing ds-express-errors and providing my honest feedback. Payment was not dependent on whether my review was positive or negative. |
|
Tested against ds-express-errors v1.9.1 Stack: Node.js 24 | Express 5.2 | sequelize 6.37.8 | sequelize-typescript 2.1.6 | TypeScript 5.3.3 | Zod 4.4.3 Experience level: Senior Score: 9/10 overall found it very easy to use. I built a simple ExpressJS API with user accounts and authentication using Feedback
Overall verdict: this would complement my development practices, mostly I favor using NestJS and this is functionally equivalent to what they consider an exception filter, it would make sense to offer a module providing it in that format. Suggestions:
«Disclosure: I received money compensation for independently testing ds-express-errors and providing my honest feedback. Payment was not dependent on whether my review was positive or negative.» |
|
Library version tested: ds-express-errors v1.9.1 Test stack: Node.js 26.7.0 + Express.js 5 + TypeScript + Prisma 7 + PostgreSQL + Zod Developer level: Senior Overall rating: 6/10 The library solves a useful problem and provides ready-made error mapping for common tools such as Prisma and Zod. The current documentation, configuration API, default response format, and several unexpected behaviors make the initial integration and debugging experience less convenient than expected. Disclosure: I received monetary compensation for independently testing ds-express-errors and providing my honest feedback. Payment was not dependent on whether my review was positive or negative. Testing SummaryI built a small Todo REST API with registration, JWT authentication, CRUD operations, PostgreSQL, Prisma, and Zod validation. I tested the central error handler, error presets, Zod and Prisma mappers, The initial middleware integration was easy, and the error presets felt intuitive. The library removed some error-handling boilerplate, especially for known Prisma errors. Configuration behavior and mapper selection took more time to understand because the documentation did not explain them clearly enough. The main issues were the default error response format, limited error details, unclear configuration options, CommonJS-only examples, unexpected mapper behavior, JWT mapping returning The library does well at collecting common error-handling concerns in one place and supporting several popular validation and database libraries. The developer experience would improve with clearer configuration documentation, ESM examples, structured error details, selectable response formats, and more predictable mapper controls. I would consider using the library in a small internal project. I would currently avoid using it in a production application without custom mappers and additional verification because several defaults and edge cases do not provide the response structure and predictability I expect. Documentation (Inspected only the Github README.md)
Mapper Configuration
This behavior is not obvious. When I would rename Error Response Format
Documentation Quality (Inspected only the Github README.md)
Error Mapping
Logging
|
ds-express-errors v1.9.1 — Developer ReviewVersion tested: v1.9.1 I built a small REST APi with two related entities (Project/Task) to test the library, covering Prisma unique constraint violations, foreign key errors, not-found lookups, and Zod validation on both request body and query params, plus a couple of endpoints specifically built to trigger unmapped/unexpected errors. Things that are wrong / I dislike
What worked well
SummaryOverall I think the library is going in the right direction: it's easy to get started, it's configurable, and it removes the need to write a custom error handler from scratch on every new project. Getting started was genuinely easy and quick, which matters a lot for adoption. Disclosure: I received monetary compensation for independently testing ds-express-errors and providing my honest feedback. Payment was not dependent on whether my review was positive or negative. |
ds-express-errors v1.9.1: developer test reviewLibrary version tested: ds-express-errors v1.9.1 I built a small users API on Express + Mongoose with a couple of Zod-validated First impressions were good. Zero dependencies, nothing to generate, no plugin to Then I started testing shutdown properly, and that is where most of my time went. Graceful shutdownSince this is the part you asked me to lean on, I wrote a harness that spawns a
Three things came out of this that I would want to know before shipping. An idle socket blocks shutdown completely, and the process exits 1. I checked that this is not just how
Under Kubernetes or systemd a SIGTERM that ends in exit 1 reads as a failed
After a crash the server keeps answering requests. On A process that has already hit an uncaught exception served traffic successfully Debugging: the original error is goneThis is my other real complaint, and it is unrelated to shutdown. By the time Not one frame points at my code. The message survives, the location does not. The same thing costs me field-level validation. Zod's Both of these come from the same root, and setting Documentation and the Detailed info sectionOverall the docs were better than I expected for a beta. I mostly found what I The graceful shutdown page is the weak one, and coming from Configuration the The questions I had while integrating, that the page does not answer:
An options table with Type / Required / Default would help too. Right now only You asked about behaviour that happens under the hood. Beyond the shutdown Smaller things
Would I use itIn a small project, yes. It took very little time to wire up and it removed real In production, not as it stands. The two things I most need from error handling None of this feels fundamental. The bugs are small and specific, the library is Disclosure: I received monetary compensation for independently testing |
|
Library version tested: ds-express-errors v1.9.1 Stack: Node.js 22.15.0 · Express 5.2.1 · TypeScript 7.0.2 (strict) · Mongoose 9.9.2 · Zod 4.4.3 · jsonwebtoken 9.0.3 Experience level: Mid-level Overall rating: 7/10 The core error pipeline is solid and removed real boilerplate for my stack. Most of my deductions are documentation gaps and production response behaviour, not broken fundamentals. Scoring:
What I builtA small task-management API (register/login with JWT, create/list/get tasks) used only to exercise Features used: Verified with 16 integration tests and manual Postman runs in development and production. What workedInstall was fast with zero runtime dependencies, which I checked.
Zod 4 failures mapped to 400 with useful field-level messages in development. Duplicate email mapped to 409. Invalid/expired JWT mapped to 401. Unmapped async and sync errors became 500 without killing the process — my Strict TypeScript compiled clean with no casts. The built-in logger is well thought out: timestamp, method, route, status, and The HTTP preset set (400/401/403/404/409/422/429/5xx) is broad enough for typical REST APIs; Issues and Suggestions1. Production validation messages collapse to generic textValidation detail is tied to In development, a Zod register failure returned: {
"status": "fail",
"message": "Validation error: email: Invalid email address; password: Too small: expected string to have >=8 characters; name: Too small: expected string to have >=2 characters"
}The same request in production returned: {
"status": "fail",
"message": "Validation error: validation error"
}Mongoose Hiding 2. Mongoose connection errors are not mapped like Sequelize/PrismaThe Mongoose mapper covers duplicate key, I would not expect a wrong 3. Library-mapped error names leak into client messagesSeveral auto-mapped errors prefix the response with the underlying error class or name, not just a client-friendly message. JWT is the clearest example I hit: invalid tokens returned Mongoose The status codes are right and the mapping works, this is mostly about message shape. For public APIs I would rather surface a stable, intentional message (or field-level detail) and keep library/class names in server logs only. 4. No clear path for error reporting (Sentry, etc.)
5.
|
Developer Experience Review:
|
ds-express-errors v1.9.1: Developer Review
What I builtA small Express + TypeScript API, based on my own API starter, to test the library. It has an auth module (Mongoose + JWT) and a product module (Mongoose + Zod). Covers signup/login and full CRUD, with validation on the query, params, and body. DocumentationFinding my way around it was easy. The writing is direct, no filler, and I didn't need to jump between five pages to understand the basics. Installation was simple and direct too: One thing I liked that I haven't seen in every library's docs: a public roadmap page, laid out like a kanban board (planned / in progress). I ended up using it a lot while writing this review, to check which of the issues below the maintainer already knows about. What I actually used
What worked well
Typecheck stayed clean through most of the migration too, no Zero dependencies. I confirmed this directly in the installed package's The best result of the test came from breaking something on purpose: I killed the Mongo container while the server was running, mid-request. The resulting error ( Graceful shutdown also checked out with a real signal, not just a read of the docs. Replaced my manual Issues and things I'd changeI checked each of these against the public roadmap (ds-express-errors.dev/roadmap), tagged below. Only #2 felt like an actual bug to me, the rest are things the library just doesn't cover yet.
Two smaller things: the generic message Would I use this in production?Yes, but mostly for a new project. My test was a migration, since I already had error handling built into my own API starter, and that's exactly where the friction showed up: the Disclosure: I received money compensation for independently testing ds-express-errors and providing my honest feedback. Payment was not dependent on whether my review was positive or negative. |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This section contains feedback by the library’s testers.
All reviews include the version, the stack, and a link to the repository where the library was used. They also include a disclosure.
For more information on what this means, see the link
All reactions