Merge pull request #428 from stevvooe/return-after-error

Return after error in handler
This commit is contained in:
Olivier Gambier 2015-04-23 14:01:25 -07:00
commit f40bf864b0

View File

@ -202,6 +202,7 @@ func (luh *layerUploadHandler) PutLayerUploadComplete(w http.ResponseWriter, r *
ctxu.GetLogger(luh).Errorf("unknown error copying into upload: %v", err) ctxu.GetLogger(luh).Errorf("unknown error copying into upload: %v", err)
w.WriteHeader(http.StatusInternalServerError) w.WriteHeader(http.StatusInternalServerError)
luh.Errors.Push(v2.ErrorCodeUnknown, err) luh.Errors.Push(v2.ErrorCodeUnknown, err)
return
} }
layer, err := luh.Upload.Finish(dgst) layer, err := luh.Upload.Finish(dgst)