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
{{ message }}
Repository navigation
Suppress stack traces from loopback.errorHandler output in production #564
shouldn't this be set by a config.json ? or any other flag
Now that the error-handling middleware is configured in server/middleware.json, it should be reasonably easy to modify the handler factory to accept an options argument which would specify the behaviour.
So looking around a bit, I understand that express errorhandler is for development only and provides no options for disabling stack traces. It looks to me that 1 idea might be to wrap express errorhandler to either return the errorhandler middleware if we are not in production or to provide a custom piece of errorhandler middleware (without stack traces) if we are. Does that sound like the right approach @bajtos ?
Activity
chinuy commentedon Mar 6, 2015
Is there any timeline you want to put this implemented?
bajtos commentedon Mar 10, 2015
Not really. Would you mind contributing this feature yourself?
pasindud commentedon Mar 21, 2015
shouldn't this be set by a config.json ? or any other flag
bajtos commentedon Mar 24, 2015
Now that the error-handling middleware is configured in
server/middleware.json, it should be reasonably easy to modify the handler factory to accept anoptionsargument which would specify the behaviour.digitalsadhu commentedon Jul 5, 2015
So looking around a bit, I understand that express errorhandler is for development only and provides no options for disabling stack traces. It looks to me that 1 idea might be to wrap express errorhandler to either return the errorhandler middleware if we are not in production or to provide a custom piece of errorhandler middleware (without stack traces) if we are. Does that sound like the right approach @bajtos ?
Merge pull request strongloop#1502 from digitalsadhu/suppress_stack_t…