diff --git a/distribution/push_v2.go b/distribution/push_v2.go index 0c322a7cbf..60171de773 100644 --- a/distribution/push_v2.go +++ b/distribution/push_v2.go @@ -466,7 +466,7 @@ func (pd *v2PushDescriptor) uploadUsingSession( case schema2.MediaTypeLayer: default: reader.Close() - return distribution.Descriptor{}, fmt.Errorf("unsupported layer media type %s", m) + return distribution.Descriptor{}, xfer.DoNotRetry{Err: fmt.Errorf("unsupported layer media type %s", m)} } digester := digest.Canonical.Digester()