Skip to content

Commit bd20171

Browse files
authored
fix(blooms): Improve error wrap to make ignoreNotFound work when fetching blocks (#13656)
Fix an issue where the `options.ignoreNotFound` of the fetcher is not effective. The root cause of this issue is that the error returned by `fmt.Errorf()` in `BloomClient` loses the underlying cause. As a result, `S3ObjectClient.IsObjectNotFoundErr()` fails to determine if the underlying cause of the returned error is of type `awserr.Error`.
1 parent cda7fc8 commit bd20171

File tree

1 file changed

+1
-1
lines changed
  • pkg/storage/stores/shipper/bloomshipper

1 file changed

+1
-1
lines changed

‎pkg/storage/stores/shipper/bloomshipper/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func (b *BloomClient) GetBlock(ctx context.Context, ref BlockRef) (BlockDirector
316316

317317
rc, _, err := b.client.GetObject(ctx, key)
318318
if err != nil {
319-
return BlockDirectory{}, fmt.Errorf("failed to get block file %s: %w", key, err)
319+
return BlockDirectory{}, errors.Wrap(err, fmt.Sprintf("failed to get block file %s", key))
320320
}
321321
defer rc.Close()
322322

0 commit comments

Comments
 (0)