Commit 808326fa authored by acud's avatar acud Committed by GitHub

fix: log missing batch id on err (#1760)

parent f0a50905
......@@ -5,7 +5,9 @@
package batchstore
import (
"encoding/hex"
"errors"
"fmt"
"math/big"
"github.com/ethersphere/bee/pkg/postage"
......@@ -85,7 +87,7 @@ func (s *store) Get(id []byte) (*postage.Batch, error) {
b := &postage.Batch{}
err := s.store.Get(batchKey(id), b)
if err != nil {
return nil, err
return nil, fmt.Errorf("get batch %s: %w", hex.EncodeToString(id), err)
}
b.Radius = s.rs.radius(s.rs.tier(b.Value))
return b, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment