Move ErrorCode logic to new errcode package
Make HTTP status codes match the ErrorCode by looking it up in the Descriptors Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
parent
5f553b3cfc
commit
f565d6abb7
16 changed files with 444 additions and 405 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/docker/distribution"
|
||||
ctxu "github.com/docker/distribution/context"
|
||||
"github.com/docker/distribution/digest"
|
||||
"github.com/docker/distribution/registry/api/errcode"
|
||||
"github.com/docker/distribution/registry/api/v2"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
@ -27,7 +28,7 @@ type Context struct {
|
|||
// Errors is a collection of errors encountered during the request to be
|
||||
// returned to the client API. If errors are added to the collection, the
|
||||
// handler *must not* start the response via http.ResponseWriter.
|
||||
Errors v2.Errors
|
||||
Errors errcode.Errors
|
||||
|
||||
urlBuilder *v2.URLBuilder
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue