Permalink
Browse files

Better error handling for sparkpost

  • Loading branch information...
allanmc committed Apr 26, 2016
1 parent 863d8dc commit c4b548a7f8bf3ce5700f31f1e41cddbc96435af7
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/email/email.js
View
@@ -39,7 +39,8 @@ exports.sendUserEmail = function (user, locals, templateName) {
client.transmissions.send(reqOpts, function(err, res) {
if (err) {
- logger.error('A SparkPost error occurred: ' + err);
+ logger.error('A SparkPost error occurred: ');
+ logger.error(JSON.stringify(err));
} else {
logger.info("Successfully sent email through SparkPost: " + JSON.stringify(res.body));
}

0 comments on commit c4b548a

Please sign in to comment.