also log out lines in error message

This commit is contained in:
Henry Oswald 2017-03-09 17:36:28 +00:00 committed by GitHub
parent dbfe5ac712
commit 8bd0df3530

View file

@ -68,7 +68,7 @@ module.exports = DocArchive =
logger.err err:err, res:res, project_id:project_id, doc_id:doc_id, "something went wrong unarchiving doc from aws"
return callback new Errors.NotFoundError("Error in S3 request")
if !(lines instanceof Array)
logger.err err:err, res:res, project_id:project_id, doc_id:doc_id, "doc lines from aws are not in array format, likely not JSON parsable"
logger.err err:err, res:res, project_id:project_id, doc_id:doc_id, lines:lines, "doc lines from aws are not in array format, likely not JSON parsable"
return callback(new Error("Error unpacking doc"))
MongoManager.upsertIntoDocCollection project_id, doc_id.toString(), {lines}, (err) ->
return callback(err) if err?
@ -90,4 +90,4 @@ module.exports = DocArchive =
timeout: thirtySeconds
json: content
uri:"https://#{settings.docstore.s3.bucket}.s3.amazonaws.com/#{key}"
}
}