fix: add multierr collection

Signed-off-by: nelson.parente <nelson_parente@live.com.pt>
This commit is contained in:
nelson.parente 2025-05-22 13:57:35 +01:00
parent 81989e025b
commit 551b4ca9c4
No known key found for this signature in database
GPG Key ID: A6DF84B8116B7D28
1 changed files with 7 additions and 3 deletions

View File

@ -32,6 +32,7 @@ import (
"cloud.google.com/go/storage"
"github.com/google/uuid"
"go.uber.org/multierr"
"google.golang.org/api/googleapi"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
@ -490,10 +491,13 @@ func (g *GCPStorage) bulkGet(ctx context.Context, req *bindings.InvokeRequest) (
wg.Wait()
close(errCh)
var multiErr error
for err := range errCh {
if err != nil {
return nil, err
}
multierr.AppendInto(&multiErr, err)
}
if multiErr != nil {
return nil, multiErr
}
return &bindings.InvokeResponse{}, nil