asherah icon indicating copy to clipboard operation
asherah copied to clipboard

[Go] Better error logging

Open smimani-godaddy opened this issue 4 years ago • 0 comments

Describe the bug If DynamoDB contains SKs encrypted using Static KMS, switching to AWS KMS causes a panic with a weird error message, if the SK is still active. The error message could/should be more descriptive so that the cause of the failure becomes evident. Right now it logs something like:

panic: unable to unmarshal envelope: invalid character '%' looking for beginning of value
goroutine 1 [running]:
main.main()
        /Users/smimani/GoDaddy/AppEncryption/asherah/samples/go/referenceapp/main.go:199 +0x81a
exit status 2

To Reproduce Steps to reproduce the behavior:

  1. Run go-reference app with Static KMS and DynamoDB metastore and all other default values
  2. Run go-reference app with AWS KMS and DynamoDB metastore and all other default values
  3. See error

Expected behavior A more descriptive error message

smimani-godaddy avatar Oct 29 '20 19:10 smimani-godaddy