Skip to content

Commit

Permalink
fix regression from removing pkg/errors (bazelbuild#564)
Browse files Browse the repository at this point in the history
errors.Wrapf used to return nil if the wrapped error is nil.
All the modified sites in the previous PR
https://github.com/bazelbuild/remote-apis-sdks/pull/552/files
were for non-nil errors except for one, which caused a regression.
  • Loading branch information
mrahs authored May 9, 2024
1 parent 20c1af5 commit f5d8d17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion go/pkg/cas/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,10 @@ func (u *uploader) scheduleUpload(ctx context.Context, item *uploadItem) error {
if marshalledRequestSize(item.Digest) > int64(u.batchBundler.BundleByteLimit) {
// There is no way this blob can fit in a batch request.
u.eg.Go(func() error {
return fmt.Errorf("%q: %w", item.Title, u.stream(ctx, item, false))
if err := u.stream(ctx, item, false); err != nil {
return fmt.Errorf("%q: %w", item.Title, err)
}
return nil
})
return nil
}
Expand Down

0 comments on commit f5d8d17

Please sign in to comment.