mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
validate the name of named volume
Signed-off-by: xlgao-zju <xlgao@zju.edu.cn>
This commit is contained in:
@@ -385,6 +385,14 @@ var (
|
||||
HTTPStatusCode: http.StatusInternalServerError,
|
||||
})
|
||||
|
||||
// ErrorCodeVolumeName is generated when the name of named volume isn't valid.
|
||||
ErrorCodeVolumeName = errcode.Register(errGroup, errcode.ErrorDescriptor{
|
||||
Value: "VOLUMENAME",
|
||||
Message: "%s looks like a relative path, but it's taken as a name. And it is not a valid name.",
|
||||
Description: "The name of named volume is invalid",
|
||||
HTTPStatusCode: http.StatusInternalServerError,
|
||||
})
|
||||
|
||||
// ErrorCodeVolumeFromBlank is generated when path to a volume is blank.
|
||||
ErrorCodeVolumeFromBlank = errcode.Register(errGroup, errcode.ErrorDescriptor{
|
||||
Value: "VOLUMEFROMBLANK",
|
||||
|
||||
Reference in New Issue
Block a user