Add blob upload invalid error code

pull/20/head
Stephen J Day 2014-12-30 20:07:37 -08:00
parent cd748f92ab
commit 83b899dab6
3 changed files with 12 additions and 0 deletions

View File

@ -977,6 +977,14 @@ var errorDescriptors = []ErrorDescriptor{
started, this error code may be returned.`,
HTTPStatusCodes: []int{http.StatusNotFound},
},
{
Code: ErrorCodeBlobUploadInvalid,
Value: "BLOB_UPLOAD_INVALID",
Message: "blob upload invalid",
Description: `The blob upload encountered an error and can no
longer proceed.`,
HTTPStatusCodes: []int{http.StatusNotFound},
},
}
var errorCodeToDescriptors map[ErrorCode]ErrorDescriptor

View File

@ -54,6 +54,9 @@ const (
// ErrorCodeBlobUploadUnknown is returned when an upload is unknown.
ErrorCodeBlobUploadUnknown
// ErrorCodeBlobUploadInvalid is returned when an upload is invalid.
ErrorCodeBlobUploadInvalid
)
// ParseErrorCode attempts to parse the error code string, returning

View File

@ -703,6 +703,7 @@ The error codes encountered via the API are enumerated in the following table:
`MANIFEST_UNVERIFIED` | manifest failed signature verification | During manifest upload, if the manifest fails signature verification, this error will be returned.
`BLOB_UNKNOWN` | blob unknown to registry | This error may be returned when a blob is unknown to the registry in a specified repository. This can be returned with a standard get or if a manifest references an unknown layer during upload.
`BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | If a blob upload has been cancelled or was never started, this error code may be returned.
`BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed.