asherah
asherah copied to clipboard
[Go] Better error logging
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:
- Run go-reference app with Static KMS and DynamoDB metastore and all other default values
- Run go-reference app with AWS KMS and DynamoDB metastore and all other default values
- See error
Expected behavior A more descriptive error message