Commit 0341a89b authored by Cory Bryant's avatar Cory Bryant

Update errors

parent 03fb025b
......@@ -47,10 +47,10 @@ module.exports=function s3BackedRenditions(config, $){
if(err.message.match(/403/)){
msg = `Error downloading rendition from S3 bucket ${s3conf.bucket}. Please check config at: ${confPath}`;
emailErrorOccasionally(params.emailError, msg);
log.error(msg, err.message);
log.error(msg, err);
}else{
msg = `Error downloading rendition from S3 bucket. ${err.message}`;
log.error(msg, err.message);
log.error(msg, err);
}
}else{
msg=`Unknown S3 download error.`;
......@@ -70,7 +70,7 @@ module.exports=function s3BackedRenditions(config, $){
var localFile = fs.createReadStream(params.renditionPathOnDisk);
localFile.on('error', function(err) {
var msg = `Unable to access ${params.renditionPathOnDisk}`;
log.error(msg, err.message);
log.error(msg, err);
emailErrorOccasionally(params.emailError, msg);
});
......@@ -83,7 +83,7 @@ module.exports=function s3BackedRenditions(config, $){
uploader.on("error", function(err){
localFile.end();
var msg = `Error uploading rendition to S3 bucket ${s3conf.bucket}. Please check config at: ${confPath}`;
log.error(msg, err.message);
log.error(msg, err);
emailErrorOccasionally(params.emailError, msg);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment