Skip to content

Commit

Permalink
Merge pull request #419 from sttts/sttts-decodeeachfile-err-context
Browse files Browse the repository at this point in the history
klient/decoder: add filename context to decode error
  • Loading branch information
k8s-ci-robot authored May 17, 2024
2 parents 931c3c4 + d1048a4 commit b34ef59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion klient/decoder/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func DecodeEachFile(ctx context.Context, fsys fs.FS, pattern string, handlerFn H
}
defer f.Close()
if err := DecodeEach(ctx, f, handlerFn, options...); err != nil {
return err
return fmt.Errorf("failed to decode file %q: %w", file, err)
}
if err := f.Close(); err != nil {
return err
Expand Down

0 comments on commit b34ef59

Please sign in to comment.