return nil with error

This commit is contained in:
Alfred Kamanda 2024-12-04 21:07:11 +03:00
parent 862830e9de
commit 7a9de79aae
Signed by untrusted user: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -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)
}