From 90ad2c24c655e7dc4ccea02003a316cee89f9605 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 19 Feb 2014 14:58:36 +0000 Subject: [PATCH] call the callback when no response is returned from s3 when checking if file exists --- services/filestore/app/coffee/s3Wrapper.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/filestore/app/coffee/s3Wrapper.coffee b/services/filestore/app/coffee/s3Wrapper.coffee index bff18f90c7..3e0c322a1a 100644 --- a/services/filestore/app/coffee/s3Wrapper.coffee +++ b/services/filestore/app/coffee/s3Wrapper.coffee @@ -101,6 +101,8 @@ module.exports = logger.err err:err, res:res, bucketName:bucketName, key:key, "something went wrong copying file in aws" if !res? 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}") + return callback(err) exists = res.statusCode == 200 logger.log bucketName:bucketName, key:key, exists:exists, "checked if file exsists in s3" callback(err, exists)