Pass through known errors
Signed-off-by: Troels Thomsen <troels@thomsen.io>
This commit is contained in:
parent
c0dcad3a48
commit
28be207bc0
4 changed files with 8 additions and 0 deletions
|
@ -634,6 +634,8 @@ func (app *App) dispatcher(dispatch dispatchFunc) http.Handler {
|
|||
context.Errors = append(context.Errors, v2.ErrorCodeNameUnknown.WithDetail(err))
|
||||
case distribution.ErrRepositoryNameInvalid:
|
||||
context.Errors = append(context.Errors, v2.ErrorCodeNameInvalid.WithDetail(err))
|
||||
case errcode.Error:
|
||||
context.Errors = append(context.Errors, err)
|
||||
}
|
||||
|
||||
if err := errcode.ServeJSON(w, context.Errors); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue