Skip to content

Commit

Permalink
fix: logging, error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Oct 20, 2023
1 parent 9dab1f4 commit 9f7a860
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,15 @@ func ExtractModInfo(ctx context.Context, body []byte, withMetadata bool, withVal
for {
asset, err := stream.Recv()
if err != nil {
if errors.Is(err, io.EOF) {
//nolint
if errors.Is(err, io.EOF) || err == io.EOF {
break
}
return nil, errors.Wrap(err, "failed reading parser stream")
}

log.Ctx(ctx).Info().Str("path", asset.GetPath()).Msg("received asset from parser")

if asset.Path == "metadata.json" {
out, err := ExtractMetadata(asset.Data)
if err != nil {
Expand Down

0 comments on commit 9f7a860

Please sign in to comment.