unifio / covalence

A tool for the management and orchestration of data used by HashiCorp infrastructure tooling.
Mozilla Public License 2.0
7 stars 3 forks source link

Covalence: print out more meaningful error message on "The specified key does not exist." #75

Open disaac opened 6 years ago

disaac commented 6 years ago

When covalence is doing a lookup on the a variable, if the key does not exist, it does not print out which key it is complaining about. This makes it hard to figure out what is missing.

example:

rake aborted!
Unable to retrieve document 'terraform-state/terraform.tfstate' from bucket 'example-terraform-state-us-west-2': The specified key does not exist.
/usr/local/bundle/gems/covalence-0.8.1/lib/covalence/core/state_stores/s3.rb:37:in `rescue in get_doc'
/usr/local/bundle/gems/covalence-0.8.1/lib/covalence/core/state_stores/s3.rb:34:in `get_doc'

Desired behavior is to have the error message message print out the missing key.