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.
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.
Reacted by Gustavo Zavaleta Vargas and Sathyamoorthi Kandhasamy
Activity
[-]Respect `expose`[/-][+]Respect `expose` on thrown errors[/+]dougwilson commentedon 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.
ksathyanm commentedon Aug 13, 2019
@dougwilson Any plan for merging develop branch changes to master?