Map error type to error code
Signed-off-by: Troels Thomsen <troels@thomsen.io>
This commit is contained in:
parent
beeff299f8
commit
e1cf7c418b
@ -169,6 +169,8 @@ func (imh *imageManifestHandler) PutImageManifest(w http.ResponseWriter, r *http
|
|||||||
switch verificationError := verificationError.(type) {
|
switch verificationError := verificationError.(type) {
|
||||||
case distribution.ErrManifestBlobUnknown:
|
case distribution.ErrManifestBlobUnknown:
|
||||||
imh.Errors = append(imh.Errors, v2.ErrorCodeManifestBlobUnknown.WithDetail(verificationError.Digest))
|
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:
|
case distribution.ErrManifestUnverified:
|
||||||
imh.Errors = append(imh.Errors, v2.ErrorCodeManifestUnverified)
|
imh.Errors = append(imh.Errors, v2.ErrorCodeManifestUnverified)
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user