Skip to content

Commit

Permalink
fix(blob): properly wrap error in GetAll method (#2853)
Browse files Browse the repository at this point in the history
Error returned by GetAll is not formatted correctly. It's especially important, because users of the method will most probably try to detect ErrBlobNotFound (to differentiate from other errors).
  • Loading branch information
tzdybal authored Oct 17, 2023
1 parent 0b85448 commit a7a17e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blob/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (s *Service) GetAll(ctx context.Context, height uint64, namespaces []share.
defer wg.Done()
blobs, err := s.getBlobs(ctx, namespace, header)
if err != nil {
resultErr[i] = fmt.Errorf("getting blobs for namespace(%s): %s", namespace.String(), err)
resultErr[i] = fmt.Errorf("getting blobs for namespace(%s): %w", namespace.String(), err)
return
}

Expand Down

0 comments on commit a7a17e4

Please sign in to comment.