-
-
Notifications
You must be signed in to change notification settings - Fork 70
Proposal: suppress stack traces in HTTP responses when running in production #13
Copy link
Copy link
Closed
Labels
Description
LoopBack users are asking for an option to suppress stack traces when running in production - see strongloop/loopback#564, strongloop/loopback#1502 and strongloop/strong-remoting#87. So far, we have implemented this feature at our side, but think it would be nice to upstream that changes and make this feature available to all errorhandler users.
I can see two rules for deciding whether the stack should be included or not:
- remove stack when NODE_ENV=production, keep it otherwise
- remove stack when options.includeStack is false, keep it otherwise
Perhaps we can implement both of them?
- if options.includeStack is not defined and NODE_ENV=production -> remove the stack
- else if options.includeStack is false -> remove the stack
- else keep the stack in
Thoughts?
Reactions are currently unavailable