Repository navigation
Bug-fix and hardening release. No breaking changes to the response contract.
Fixes
- Coerced errors keep the original stack trace and
cause. instanceof AppErrorworks across duplicate package copies (CJS + ESM).- Invalid
LOG_LEVELno longer crashes the app at import time. - Logger crash-safety survives
logger.levelchanges; custom serializers no longer drop the AppError serializer. - Express:
logger: nullno longer crashes; Winston is detected;includeStackInLog: falsereally hides stacks; request IDs are validated; numericreq.idis used. sanitizeDetailsno longer marks shared objects as[Circular];JSON.stringify(appError)with BigInt details no longer throws.- Types resolve under
moduleResolution: "node".
Added
- Prisma, Zod, Joi and Mongoose
DocumentNotFoundErrorcoercion; more statuses mapped toErrorCode. toHttpResponse,createNotFoundHandler,asyncHandler,GatewayTimeoutError,BadGatewayError,MessageProcessingFailedError.- Every error class accepts
detailsand{ cause }.
Behavior changes
- Dev mode Express responses now include 500
details(production still hides them). - Default log lines include
pidandhostname. - 413 maps to
PAYLOAD_TOO_LARGEinstead ofBAD_REQUEST.