godaddy / godaddy/asherah

[Go] Better error logging

Open
#330 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
83
Forks
50
Avg merge
4d 8h
Merged PRs (30d)
7

Description

**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:

```bash
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.