Skip to content

[Go] Better error logging #330

@smimani-godaddy

Description

@smimani-godaddy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions