Skip to content

Commit

Permalink
fetcher: Add layer hash to error message
Browse files Browse the repository at this point in the history
In order to better debug errors it helps to have the
layer hash to be able to analyse the offending layer.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy committed Oct 25, 2022
1 parent 713df2f commit 4d50715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libindex/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (a *RemoteFetchArena) fetchOne(ctx context.Context, l *claircore.Layer) (do
return a.realizeLayer(ctx, l)
}):
if err := res.Err; err != nil {
return err
return fmt.Errorf("error realizing layer %s: %w", h, err)
}
ff = res.Val.(string)
case <-ctx.Done():
Expand Down

0 comments on commit 4d50715

Please sign in to comment.