call callback when error returned from getign status of file

This commit is contained in:
Henry Oswald 2014-02-19 15:26:00 +00:00
parent 0a2ce3b869
commit b24ae77f4c

View file

@ -99,6 +99,7 @@ module.exports =
request options, (err, res)-> request options, (err, res)->
if err? if err?
logger.err err:err, res:res, bucketName:bucketName, key:key, "something went wrong checking file in aws" logger.err err:err, res:res, bucketName:bucketName, key:key, "something went wrong checking file in aws"
return callback(err)
if !res? if !res?
logger.err err:err, res:res, bucketName:bucketName, key:key, "no response object returned when checking if file exists" logger.err err:err, res:res, bucketName:bucketName, key:key, "no response object returned when checking if file exists"
err = new Error("no response from s3 #{bucketName} #{key}") err = new Error("no response from s3 #{bucketName} #{key}")