forked from urdt/ussd
return nil with error
This commit is contained in:
parent
862830e9de
commit
7a9de79aae
@ -70,8 +70,7 @@ func GetVoucherData(ctx context.Context, db storage.PrefixDb, input string) (*da
|
|||||||
for _, key := range keys {
|
for _, key := range keys {
|
||||||
value, err := db.Get(ctx, key.ToBytes())
|
value, err := db.Get(ctx, key.ToBytes())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("failed to get %v: %v\n", key, err)
|
return nil, fmt.Errorf("failed to get %s: %v", key.ToBytes(), err)
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
data[key] = string(value)
|
data[key] = string(value)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user