property ErrorHandlerOptions.maskInternalErrors

When true (the default), a caught value that was not an HttpError and resolves to a status >= 500 is masked in the response: its detail/message becomes the status title ('Internal Server Error') and the raw message — which for a failed query carries the SQL and its bound parameter values — is dropped from the body. The log is unaffected: logErrors still records the unmasked error and its cause chain, so an operator loses nothing unless logErrors is also false, the configuration that already logs nothing.

A deliberately thrown HttpError is never masked — instanceof HttpError is the line between "the developer wrote this for a caller" and "this escaped from a driver". false restores the previous behaviour verbatim.

Type

boolean

Usage

import { type ErrorHandlerOptions } from "exceptions/src/index.ts";