var winston = require('winston');

function failedPromiseHandler(logger) {
  logger = logger || winston;

  return function(err) {
    logger.error(err);
  };
}

module.exports = {
  failedPromiseHandler: failedPromiseHandler
}

var winston = require('winston');

function failedPromiseHandler(logger) {
  logger = logger || winston;

  return function(err) {
    logger.error(err.stack);
  };
}

module.exports = {
  failedPromiseHandler: failedPromiseHandler
}

Print error stacktrace when promise fails
Print error stacktrace when promise fails
