expressjs / api-error-handler

Express error handlers for JSON APIs
MIT License
101 stars 23 forks source link

add noStackEnvs option #2

Open dankahle opened 9 years ago

dankahle commented 9 years ago

Another pull as the last one's copy/paste/edit features messed up the diff. It kinda uglifies a simple module, just throwing it out there for an option. There is a beauty in specifying which envs to not show the stack for. The true/false option is much simpler for the module, I'll give you that, just that this was easier for the user of the module is all. Junks things up though.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-66.67%) to 33.33% when pulling 3728116f42a229fb2ba36284a61cb796622cec0d on dankahle:nostackenvs into df765a50c0c1de4fdbe4ce9cef2d910df4d8ba3e on expressjs:master.

dougwilson commented 9 years ago

We will only accept the true/false implementation.

jonathanong commented 9 years ago

yeah this implementation is over complicated. and process.env.NODE_ENV.toLowerCase() is going to fail if NODE_ENV doesn't happen to be defined.

dankahle commented 9 years ago

No biggy, just wanted to throw it out there. Thanks for looking at it.

On Thu, Mar 26, 2015 at 1:59 PM, jongleberry notifications@github.com wrote:

yeah this implementation is over complicated. and process.env.NODE_ENV.toLowerCase() is going to fail if NODE_ENV doesn't happen to be defined.

— Reply to this email directly or view it on GitHub https://github.com/expressjs/api-error-handler/pull/2#issuecomment-86713659 .