diff --git a/api/v2/descriptors.go b/api/v2/descriptors.go index dfbbc6f90..1ee5471ee 100644 --- a/api/v2/descriptors.go +++ b/api/v2/descriptors.go @@ -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 diff --git a/api/v2/errors.go b/api/v2/errors.go index 94c646fc8..4d5d55c7a 100644 --- a/api/v2/errors.go +++ b/api/v2/errors.go @@ -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 diff --git a/doc/SPEC.md b/doc/SPEC.md index 13b510e3d..ebf4958e8 100644 --- a/doc/SPEC.md +++ b/doc/SPEC.md @@ -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.