mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
feat: propagate detailed error msgs to client (OCI dist-spec format) (#1681)
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func GetLinter(config *config.Config, log log.Logger) *lint.Linter {
|
||||
log.Warn().Msg("lint extension is disabled because given zot binary doesn't" +
|
||||
log.Warn().Msg("lint extension is disabled because given zot binary doesn't " +
|
||||
"include this feature please build a binary that does so")
|
||||
|
||||
return nil
|
||||
|
||||
@@ -105,7 +105,7 @@ func (linter *Linter) CheckMandatoryAnnotations(repo string, manifestDigest godi
|
||||
string(manifestDigest), string(configDigest), missingAnnotations)
|
||||
linter.log.Error().Msg(msg)
|
||||
|
||||
return false, fmt.Errorf("%s: %w", msg, zerr.ErrImageLintAnnotations)
|
||||
return false, zerr.NewError(zerr.ErrImageLintAnnotations).AddDetail("missingAnnotations", msg)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
|
||||
Reference in New Issue
Block a user