Adding error codes to image package

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
This commit is contained in:
Srini Brahmaroutu
2015-09-23 00:17:46 +00:00
parent 9dc0973655
commit da0ca83377
2 changed files with 22 additions and 2 deletions

20
errors/image.go Normal file
View File

@@ -0,0 +1,20 @@
package errors
// This file contains all of the errors that can be generated from the
// docker/image component.
import (
"net/http"
"github.com/docker/distribution/registry/api/errcode"
)
var (
// ErrorCodeInvalidImageID is generated when image id specified is incorrectly formatted.
ErrorCodeInvalidImageID = errcode.Register(errGroup, errcode.ErrorDescriptor{
Value: "INVALIDIMAGEID",
Message: "image ID '%s' is invalid ",
Description: "The specified image id is incorrectly formatted",
HTTPStatusCode: http.StatusInternalServerError,
})
)