registry/api: move all errors to "errcode" package
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a2e65220ae
commit
292e30bc61
13 changed files with 352 additions and 280 deletions
|
@ -661,9 +661,9 @@ func (app *App) dispatcher(dispatch dispatchFunc) http.Handler {
|
|||
|
||||
switch err := err.(type) {
|
||||
case distribution.ErrRepositoryUnknown:
|
||||
context.Errors = append(context.Errors, v2.ErrorCodeNameUnknown.WithDetail(err))
|
||||
context.Errors = append(context.Errors, errcode.ErrorCodeNameUnknown.WithDetail(err))
|
||||
case distribution.ErrRepositoryNameInvalid:
|
||||
context.Errors = append(context.Errors, v2.ErrorCodeNameInvalid.WithDetail(err))
|
||||
context.Errors = append(context.Errors, errcode.ErrorCodeNameInvalid.WithDetail(err))
|
||||
case errcode.Error:
|
||||
context.Errors = append(context.Errors, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue