Skip to content

Commit

Permalink
Merge pull request #70 from hinling-whistle/DEVOPS-1997
Browse files Browse the repository at this point in the history
[DEVOPS-1997] -- add key to error message
  • Loading branch information
kjonick1 authored Sep 25, 2018
2 parents b5b7997 + a2d4ffe commit 2f1d741
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/covalence/core/state_stores/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ def get_doc(bucket, document)
@cache[bucket][document] ||= begin
@s3.get_object(bucket: bucket, key: document).body.read
rescue Aws::S3::Errors::ServiceError => err
fail "Unable to retrieve document '#{document}' from bucket '#{bucket}': " + err.message
raise err, "Unable to retrieve document '#{document}' from bucket '#{bucket}'"
end
end

def get_key(bucket, document, name)
doc = self.get_doc(bucket, document)
begin
doc = self.get_doc(bucket, document)
rescue Aws::S3::Errors::ServiceError => err
fail err.message + " and the key is: #{name}. Check your data files."
end

# Parse JSON response
begin
Expand Down

0 comments on commit 2f1d741

Please sign in to comment.