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:
peusebiu
2023-03-17 05:09:30 +02:00
committed by GitHub
parent eea6f3f85a
commit 17a554b504
4 changed files with 14 additions and 4 deletions
+6
View File
@@ -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"`
}