Skip to content

Releases

v1.2.0

Choose a tag to compare

@Sahil-coder-30 Sahil-coder-30 released this 12 Nov 16:02

Bug-fix and hardening release. No breaking changes to the response contract.

Fixes

  • Coerced errors keep the original stack trace and cause.
  • instanceof AppError works across duplicate package copies (CJS + ESM).
  • Invalid LOG_LEVEL no longer crashes the app at import time.
  • Logger crash-safety survives logger.level changes; custom serializers no longer drop the AppError serializer.
  • Express: logger: null no longer crashes; Winston is detected; includeStackInLog: false really hides stacks; request IDs are validated; numeric req.id is used.
  • sanitizeDetails no 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 DocumentNotFoundError coercion; more statuses mapped to ErrorCode.
  • toHttpResponse, createNotFoundHandler, asyncHandler, GatewayTimeoutError, BadGatewayError, MessageProcessingFailedError.
  • Every error class accepts details and { cause }.

Behavior changes

  • Dev mode Express responses now include 500 details (production still hides them).
  • Default log lines include pid and hostname.
  • 413 maps to PAYLOAD_TOO_LARGE instead of BAD_REQUEST.