forked from TrueCloudLab/distribution
Merge pull request #407 from stevvooe/log-canonical-digest
log canonical digest on verification error
This commit is contained in:
commit
ad69b9d984
1 changed files with 2 additions and 0 deletions
|
@ -345,6 +345,8 @@ func (lw *layerWriter) validateLayer(dgst digest.Digest) (digest.Digest, error)
|
|||
}
|
||||
|
||||
if !verified {
|
||||
ctxu.GetLoggerWithField(lw.layerStore.repository.ctx, "canonical", dgst).
|
||||
Errorf("canonical digest does match provided digest")
|
||||
return "", distribution.ErrLayerInvalidDigest{
|
||||
Digest: dgst,
|
||||
Reason: fmt.Errorf("content does not match digest"),
|
||||
|
|
Loading…
Reference in a new issue