You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
dcherman
changed the title
Respect expose
Respect expose on thrown errors
Jul 2, 2018
Indeed, this is already planned! An initial implementation to expose err.message for custom response messages is available on the develop branch right now if you want to test it out.
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 usingthrow BadRequest('You must include an Id')
fromhttp-errors
or a similar lib.The text was updated successfully, but these errors were encountered: