mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
image level lint: enforce manifest mandatory annotations
closes #536 Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com>
This commit is contained in:
committed by
Andrei Aaron
parent
3d72dad507
commit
87fc941b3c
@@ -470,6 +470,9 @@ func (rh *RouteHandler) UpdateManifest(response http.ResponseWriter, request *ht
|
||||
} else if errors.Is(err, zerr.ErrRepoBadVersion) {
|
||||
WriteJSON(response, http.StatusInternalServerError,
|
||||
NewErrorList(NewError(INVALID_INDEX, map[string]string{"name": name})))
|
||||
} else if errors.Is(err, zerr.ErrImageLintAnnotations) {
|
||||
WriteJSON(response, http.StatusBadRequest,
|
||||
NewErrorList(NewError(MANIFEST_INVALID, map[string]string{"reference": reference})))
|
||||
} else {
|
||||
// could be syscall.EMFILE (Err:0x18 too many opened files), etc
|
||||
rh.c.Log.Error().Err(err).Msg("unexpected error: performing cleanup")
|
||||
|
||||
Reference in New Issue
Block a user