Pass through known errors

Signed-off-by: Troels Thomsen <troels@thomsen.io>
This commit is contained in:
Troels Thomsen 2016-04-29 23:34:24 +02:00
parent c0dcad3a48
commit 28be207bc0
4 changed files with 8 additions and 0 deletions

View file

@ -239,6 +239,8 @@ func (buh *blobUploadHandler) PutBlobUploadComplete(w http.ResponseWriter, r *ht
switch err := err.(type) {
case distribution.ErrBlobInvalidDigest:
buh.Errors = append(buh.Errors, v2.ErrorCodeDigestInvalid.WithDetail(err))
case errcode.Error:
buh.Errors = append(buh.Errors, err)
default:
switch err {
case distribution.ErrAccessDenied: