Patches request-promises error classes for node logging
MIT License
Patches request-promise-core errors to not include sensitive information during logging in NodeJS.
npm i --save request-promise-errors-util-inspect
In your main file
require('request-promise-errors-util-inspect');
If you need to log the response, set the environment variable LOG_LEVEL
to debug
request-promise-core/errors
exports 3 classes,
Doing a console.log of these errors will print the whole response object, exposing sensitive informations and/or bloating the console with unuseful informations.
When required, this package monkey patches these classes to introduce two new functions ([util.inspect.custom]
and toJSON
) to pretty print and serialize the errors.
MIT