Skip to content

Commit

Permalink
Wrap errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed Jun 14, 2024
1 parent d7276af commit 528adde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (s *Store) putTableViaStorageWriteAPI(ctx context.Context, bqTableID TableI
managedwriter.EnableWriteRetries(true),
)
if err != nil {
return fmt.Errorf("failed to create managed stream")
return fmt.Errorf("failed to create managed stream: %w", err)
}
defer managedStream.Close()

Expand All @@ -203,7 +203,7 @@ func (s *Store) putTableViaStorageWriteAPI(ctx context.Context, bqTableID TableI
for i, row := range chunk {
message, err := rowToMessage(row, columns, *messageDescriptor, s.AdditionalDateFormats())
if err != nil {
return err
return fmt.Errorf("failed to convert row to message: %w", err)
}

bytes, err := proto.Marshal(message)
Expand Down

0 comments on commit 528adde

Please sign in to comment.