https://www.npmjs.com/package/http-errors
When we're extracting the message out of a thrown error, we should consider respecting the expose property on it so that we provide consumers some way of exposing information to the client in the event that they want to return something like an HTTP 400 by using throw BadRequest('You must include an Id') from http-errors or a similar lib.
https://www.npmjs.com/package/http-errors
When we're extracting the message out of a thrown error, we should consider respecting the
exposeproperty on it so that we provide consumers some way of exposing information to the client in the event that they want to return something like an HTTP 400 by usingthrow BadRequest('You must include an Id')fromhttp-errorsor a similar lib.