Move common error codes to errcode package
Several error codes are generally useful but tied to the v2 specification definitions. This change moves these error code definitions into the common package for use by the health package, which is not tied to the v2 API. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
288c46e998
commit
ed3ecfdccb
10 changed files with 60 additions and 50 deletions
|
@ -81,7 +81,7 @@ func (bh *blobHandler) DeleteBlob(w http.ResponseWriter, r *http.Request) {
|
|||
bh.Errors = append(bh.Errors, v2.ErrorCodeBlobUnknown)
|
||||
case distribution.ErrUnsupported:
|
||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
||||
bh.Errors = append(bh.Errors, v2.ErrorCodeUnsupported)
|
||||
bh.Errors = append(bh.Errors, errcode.ErrorCodeUnsupported)
|
||||
default:
|
||||
bh.Errors = append(bh.Errors, errcode.ErrorCodeUnknown)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue