Per the discussion in expressjs/errorhandler#13, we should not use errorhandler module in production:
The PR #1502 is only a false sense of security; yes, the stack property will no longer be included, but it will still expose anything util.inspect will provide for non-Error objects.
(...)
There still remains a big problem with using this in production: the err.message will be exposed still, which will contain a full path if that err came from fs.readFile, or a hostname if that came from a net operation in the newer io.js builds, etc.
(...)
In reality, only the finalhandler module provides suitable out-of-the-box production error support (and you get that by... not adding an error handler to your express app, which is what the example in this module's README does).
For example, we can use api-error-handler for JSON API requests/responses in strong-remoting.
I am creating this GH issue as a place where we can discuss possible approaches and agree on a solution to implement.
/to @ritch @raymondfeng
/cc @fabien @clarkorz
Subtasks
Per the discussion in expressjs/errorhandler#13, we should not use
errorhandlermodule in production:For example, we can use api-error-handler for JSON API requests/responses in strong-remoting.
I am creating this GH issue as a place where we can discuss possible approaches and agree on a solution to implement.
/to @ritch @raymondfeng
/cc @fabien @clarkorz
Subtasks
strong-error-handlerwith the usual scaffolding (jscs and jshint, mocha + chai for unit tests, etc.). License: dual MIT + SL