From 7a9de79aae67ee37369195899770a475f5cd8d55 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Wed, 4 Dec 2024 21:07:11 +0300 Subject: [PATCH] return nil with error --- common/vouchers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/vouchers.go b/common/vouchers.go index 5863c46..e3cc134 100644 --- a/common/vouchers.go +++ b/common/vouchers.go @@ -70,8 +70,7 @@ func GetVoucherData(ctx context.Context, db storage.PrefixDb, input string) (*da for _, key := range keys { value, err := db.Get(ctx, key.ToBytes()) if err != nil { - fmt.Printf("failed to get %v: %v\n", key, err) - continue + return nil, fmt.Errorf("failed to get %s: %v", key.ToBytes(), err) } data[key] = string(value) }