Skip to content

Commit

Permalink
chore(share/ipld): pretify error (#2284)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan authored May 31, 2023
1 parent 011765a commit d53efbd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions share/ipld/namespace_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package ipld

import (
"context"
"encoding/hex"
"errors"
"fmt"
"sync"
Expand Down Expand Up @@ -166,7 +167,7 @@ func (n *NamespaceData) CollectLeavesByNamespace(
defer span.End()

span.SetAttributes(
attribute.String("namespace", n.nID.String()),
attribute.String("namespace", hex.EncodeToString(n.nID)),
attribute.String("root", root.String()),
)

Expand Down Expand Up @@ -213,8 +214,8 @@ func (n *NamespaceData) CollectLeavesByNamespace(
singleErr.Do(func() {
retrievalErr = err
})
log.Errorw("getLeavesWithProofsByNamespace:could not retrieve node",
"nID", n.nID,
log.Errorw("could not retrieve IPLD node",
"nID", hex.EncodeToString(n.nID),
"pos", j.sharePos,
"err", err,
)
Expand Down

0 comments on commit d53efbd

Please sign in to comment.