postlight / lux

Build scalable, Node.js-powered REST JSON APIs with almost no code.
https://lux.postlight.com
MIT License
570 stars 60 forks source link

feat: allow detail messages that contain [public] in error responses #735

Open jamemackson opened 6 years ago

jamemackson commented 6 years ago

After https://github.com/postlight/lux/pull/713 was merged, this made it impossible to return any meaningful error messages when desired. This PR adds a rudimentary way to specifically allow a message detail by including [public] in the message.

When the [public] tag is found in the message, the error.detail value is set and the [public] string is removed.