Skip to content

Commit

Permalink
descriptive err
Browse files Browse the repository at this point in the history
  • Loading branch information
calbera committed Oct 15, 2024
1 parent 0efdc2d commit 1767d2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mod/node-api/handlers/utils/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"strconv"
"strings"

"github.com/berachain/beacon-kit/mod/errors"
"github.com/berachain/beacon-kit/mod/primitives/pkg/common"
"github.com/berachain/beacon-kit/mod/primitives/pkg/math"
)
Expand Down Expand Up @@ -92,7 +93,9 @@ func ParentSlotFromTimestampID[StorageBackendT interface {
// Parse the timestamp from the timestampID.
timestamp, err := U64FromString(timestampID[1:])
if err != nil {
return 0, err
return 0, errors.Wrapf(
err, "failed to parse timestamp from timestampID: %s", timestampID,
)
}
return storage.GetParentSlotByTimestamp(timestamp)
}
Expand Down

0 comments on commit 1767d2c

Please sign in to comment.