Skip to content

Commit

Permalink
chore: handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
polebug committed Dec 6, 2024
1 parent b8c9d84 commit 8c85d88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions provider/atproto/bluesky/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ func (c *Client) ParseCARList(ctx context.Context, did syntax.DID, handle string

recList := make([]*at.Message, 0)

errorGroup, _ := errgroup.WithContext(ctx)
errorGroup, errorCtx := errgroup.WithContext(ctx)

// Iterate over all records
_ = r.ForEach(ctx, "", func(path string, _ cid.Cid) error {
_ = r.ForEach(errorCtx, "", func(path string, _ cid.Cid) error {
errorGroup.Go(func() error {
zap.L().Debug("processing record", zap.String("path", path))

Expand Down Expand Up @@ -209,7 +209,7 @@ func (c *Client) ParseCARList(ctx context.Context, did syntax.DID, handle string
if err != nil {
zap.L().Error("parse record failed", zap.Error(err))

return nil
return err
}

if isValid {
Expand Down

0 comments on commit 8c85d88

Please sign in to comment.