Changelog - 2026-11-06
The validation response carries no raw error in production
Security Bug FixIn one line. When a Zod error's message was not a parsable list of issues, the production 422 response put the raw error object in details.cause. It now carries no cause.
What changed
- Issues only. In production
details.causeis the list of issues (path,message,code,expected,received). If the message is not a list,details.causeis absent. - Outside production the raw error stays in
details.causefor debugging.
Who is affected
- Clients that read
details.causeof a 422 in production. The issue list is unchanged. - Everyone else. No action needed.
Details
| File | Package |
|---|---|
src/base/middlewares/app-error/zod.handler.ts | kernel |