From 2b77ed7548dd97a9aae5862229beb2bb8beab4a9 Mon Sep 17 00:00:00 2001 From: Krrish Date: Sat, 9 May 2026 00:24:32 +0530 Subject: [PATCH] fix: wrap underlying errors with %w Signed-off-by: Krrish --- pkg/picod/auth.go | 2 +- pkg/store/store_valkey.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/picod/auth.go b/pkg/picod/auth.go index 7e4b9c5e..dbeef5b7 100644 --- a/pkg/picod/auth.go +++ b/pkg/picod/auth.go @@ -70,7 +70,7 @@ func (am *AuthManager) LoadPublicKeyFromEnv() error { pub, err := x509.ParsePKIXPublicKey(block.Bytes) if err != nil { - return fmt.Errorf("failed to parse public key: %v", err) + return fmt.Errorf("failed to parse public key: %w", err) } rsaPub, ok := pub.(*rsa.PublicKey) diff --git a/pkg/store/store_valkey.go b/pkg/store/store_valkey.go index 70972199..545ebc0a 100644 --- a/pkg/store/store_valkey.go +++ b/pkg/store/store_valkey.go @@ -113,7 +113,7 @@ func (vs *valkeyStore) loadSandboxesBySessionIDs(ctx context.Context, sessionIDs // MGet should in same slot stingSliceResults, err := vs.cli.Do(ctx, vs.cli.B().Mget().Key(sessionIDKeys...).Build()).AsStrSlice() if err != nil { - return nil, fmt.Errorf("loadSandboxesBySessionIDs: Valkey MGet sandboxes failed: %v", err) + return nil, fmt.Errorf("loadSandboxesBySessionIDs: Valkey MGet sandboxes failed: %w", err) } if len(stingSliceResults) > len(sessionIDKeys) {