Skip to content

Commit 14c4ba8

Browse files
committed
Wrap err with key secret name
1 parent 703e7c6 commit 14c4ba8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/gcp/secret_manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func NewSecretManagerSigner(ctx context.Context, publicKeySecretName, privateKey
7171
// Public Key
7272
publicKeyRaw, err := accessSecretVersion(ctx, client, publicKeySecretName)
7373
if err != nil {
74-
return nil, err
74+
return nil, fmt.Errorf("failed to access public key secret (%s): %w", publicKeySecretName, err)
7575
}
7676
pemBlock, rest := pem.Decode([]byte(publicKeyRaw))
7777
if pemBlock == nil {
@@ -94,7 +94,7 @@ func NewSecretManagerSigner(ctx context.Context, publicKeySecretName, privateKey
9494
// Private Key
9595
privateKeyRaw, err := accessSecretVersion(ctx, client, privateKeySecretName)
9696
if err != nil {
97-
return nil, err
97+
return nil, fmt.Errorf("failed to access private key secret (%s): %w", privateKeySecretName, err)
9898
}
9999
pemBlock, rest = pem.Decode([]byte(privateKeyRaw))
100100
if pemBlock == nil {

0 commit comments

Comments
 (0)