mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
feat(routes): better error message in case of missing annotations (#1150)
putting this info into error detail would be ideal, but skopeo doesn't print them, so overwrite the error message. Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
@@ -11,6 +11,12 @@ type Error struct {
|
||||
Detail interface{} `json:"detail,omitempty"`
|
||||
}
|
||||
|
||||
func (e Error) WithMessage(msg string) Error {
|
||||
e.Message = msg
|
||||
|
||||
return e
|
||||
}
|
||||
|
||||
type ErrorList struct {
|
||||
Errors []*Error `json:"errors"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user