From 300ce35c121b53020858f35584fe97d12386a8c8 Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Tue, 1 Dec 2015 22:26:37 +0100 Subject: [PATCH] Map error type to error code Signed-off-by: Troels Thomsen --- registry/handlers/images.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/registry/handlers/images.go b/registry/handlers/images.go index f753f099f..d30fce267 100644 --- a/registry/handlers/images.go +++ b/registry/handlers/images.go @@ -169,6 +169,8 @@ func (imh *imageManifestHandler) PutImageManifest(w http.ResponseWriter, r *http switch verificationError := verificationError.(type) { case distribution.ErrManifestBlobUnknown: imh.Errors = append(imh.Errors, v2.ErrorCodeManifestBlobUnknown.WithDetail(verificationError.Digest)) + case distribution.ErrManifestNameInvalid: + imh.Errors = append(imh.Errors, v2.ErrorCodeNameInvalid.WithDetail(err)) case distribution.ErrManifestUnverified: imh.Errors = append(imh.Errors, v2.ErrorCodeManifestUnverified) default: