Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
use correct error
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshkshah1992 committed Aug 8, 2023
1 parent b289e62 commit 21090d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gateway_traversal.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func carToLinearBlockGetter(ctx context.Context, reader io.Reader, metrics *Grap
if blkRead.block != nil {
metrics.carBlocksFetchedMetric.Inc()
if !blkRead.block.Cid().Equals(c) {
return nil, ErrNilBlock
return nil, caboose.ErrInvalidResponse{Message: fmt.Sprintf("received block with cid %s, expected %s", blkRead.block.Cid(), c)}
}
return blkRead.block, nil
}
Expand Down

0 comments on commit 21090d0

Please sign in to comment.