Skip to content

Commit

Permalink
improve log
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed May 13, 2024
1 parent 63d7aca commit 75d09cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions x/e2ee/client/cli/encrypt_to_validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,14 @@ func EncryptToValidatorsCommand() *cobra.Command {

recipients := make([]age.Recipient, len(recs))
for i, key := range rsp.Keys {
if len(key) == 0 {
fmt.Fprintf(os.Stderr, "missing encryption key for validator %s\n", recs[i])
continue
}

recipient, err := age.ParseX25519Recipient(key)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to parse recipient key: %v\n", err)
continue
return err
}
recipients[i] = recipient
}
Expand Down

0 comments on commit 75d09cb

Please sign in to comment.