{"modulePath":"github.com/hyperhq/hypercli","version":"v1.10.16","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\n## Variables\n\n```go\nvar (\n\t// ErrorCodeAtLeastOneArg is generated when the parser comes across a\n\t// Dockerfile command that doesn't have any args.\n\tErrorCodeAtLeastOneArg = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"ATLEASTONEARG\",\n\t\tMessage:        \"%s requires at least one argument\",\n\t\tDescription:    \"The specified command requires at least one argument\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeExactlyOneArg is generated when the parser comes across a\n\t// Dockerfile command that requires exactly one arg but got less/more.\n\tErrorCodeExactlyOneArg = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXACTLYONEARG\",\n\t\tMessage:        \"%s requires exactly one argument\",\n\t\tDescription:    \"The specified command requires exactly one argument\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeAtLeastTwoArgs is generated when the parser comes across a\n\t// Dockerfile command that requires at least two args but got less.\n\tErrorCodeAtLeastTwoArgs = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"ATLEASTTWOARGS\",\n\t\tMessage:        \"%s requires at least two arguments\",\n\t\tDescription:    \"The specified command requires at least two arguments\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeTooManyArgs is generated when the parser comes across a\n\t// Dockerfile command that has more args than it should\n\tErrorCodeTooManyArgs = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"TOOMANYARGS\",\n\t\tMessage:        \"Bad input to %s, too many args\",\n\t\tDescription:    \"The specified command was passed too many arguments\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeChainOnBuild is generated when the parser comes across a\n\t// Dockerfile command that is trying to chain ONBUILD commands.\n\tErrorCodeChainOnBuild = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CHAINONBUILD\",\n\t\tMessage:        \"Chaining ONBUILD via `ONBUILD ONBUILD` isn't allowed\",\n\t\tDescription:    \"ONBUILD Dockerfile commands aren't allow on ONBUILD commands\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeBadOnBuildCmd is generated when the parser comes across a\n\t// an ONBUILD Dockerfile command with an invalid trigger/command.\n\tErrorCodeBadOnBuildCmd = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"BADONBUILDCMD\",\n\t\tMessage:        \"%s isn't allowed as an ONBUILD trigger\",\n\t\tDescription:    \"The specified ONBUILD command isn't allowed\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeMissingFrom is generated when the Dockerfile is missing\n\t// a FROM command.\n\tErrorCodeMissingFrom = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"MISSINGFROM\",\n\t\tMessage:        \"Please provide a source image with `from` prior to run\",\n\t\tDescription:    \"The Dockerfile is missing a FROM command\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNotOnWindows is generated when the specified Dockerfile\n\t// command is not supported on Windows.\n\tErrorCodeNotOnWindows = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOTONWINDOWS\",\n\t\tMessage:        \"%s is not supported on Windows\",\n\t\tDescription:    \"The specified Dockerfile command is not supported on Windows\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeEmpty is generated when the specified Volume string\n\t// is empty.\n\tErrorCodeVolumeEmpty = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMEEMPTY\",\n\t\tMessage:        \"Volume specified can not be an empty string\",\n\t\tDescription:    \"The specified volume can not be an empty string\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n)\n```\n\n```go\nvar (\n\t// ErrorCodeNoSuchContainer is generated when we look for a container by\n\t// name or ID and we can't find it.\n\tErrorCodeNoSuchContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOSUCHCONTAINER\",\n\t\tMessage:        \"No such container: %s\",\n\t\tDescription:    \"The specified container can not be found\",\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeUnregisteredContainer is generated when we try to load\n\t// a storage driver for an unregistered container\n\tErrorCodeUnregisteredContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"UNREGISTEREDCONTAINER\",\n\t\tMessage:        \"Can't load storage driver for unregistered container %s\",\n\t\tDescription:    \"An attempt was made to load the storage driver for a container that is not registered with the daemon\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeContainerBeingRemoved is generated when an attempt to start\n\t// a container is made but its in the process of being removed, or is dead.\n\tErrorCodeContainerBeingRemoved = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CONTAINERBEINGREMOVED\",\n\t\tMessage:        \"Container is marked for removal and cannot be started.\",\n\t\tDescription:    \"An attempt was made to start a container that is in the process of being deleted\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeUnpauseContainer is generated when we attempt to stop a\n\t// container but its paused.\n\tErrorCodeUnpauseContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"UNPAUSECONTAINER\",\n\t\tMessage:        \"Container %s is paused. Unpause the container before stopping\",\n\t\tDescription:    \"The specified container is paused, before it can be stopped it must be unpaused\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRemovalContainer is generated when we attempt to connect or disconnect a\n\t// container but it's marked for removal.\n\tErrorCodeRemovalContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"REMOVALCONTAINER\",\n\t\tMessage:        \"Container %s is marked for removal and cannot be connected or disconnected to the network\",\n\t\tDescription:    \"The specified container is marked for removal and cannot be connected or disconnected to the network\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodePausedContainer is generated when we attempt to attach a\n\t// container but its paused.\n\tErrorCodePausedContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CONTAINERPAUSED\",\n\t\tMessage:        \"Container %s is paused. Unpause the container before attach\",\n\t\tDescription:    \"The specified container is paused, unpause the container before attach\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\t// ErrorCodeAlreadyPaused is generated when we attempt to pause a\n\t// container when its already paused.\n\tErrorCodeAlreadyPaused = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"ALREADYPAUSED\",\n\t\tMessage:        \"Container %s is already paused\",\n\t\tDescription:    \"The specified container is already in the paused state\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNotPaused is generated when we attempt to unpause a\n\t// container when its not paused.\n\tErrorCodeNotPaused = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOTPAUSED\",\n\t\tMessage:        \"Container %s is not paused\",\n\t\tDescription:    \"The specified container can not be unpaused because it is not in a paused state\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeImageUnregContainer is generated when we attempt to get the\n\t// image of an unknown/unregistered container.\n\tErrorCodeImageUnregContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"IMAGEUNREGCONTAINER\",\n\t\tMessage:        \"Can't get image of unregistered container\",\n\t\tDescription:    \"An attempt to retrieve the image of a container was made but the container is not registered\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeEmptyID is generated when an ID is the empty string.\n\tErrorCodeEmptyID = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EMPTYID\",\n\t\tMessage:        \"Invalid empty id\",\n\t\tDescription:    \"An attempt was made to register a container but the container's ID can not be an empty string\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeLoggingFactory is generated when we could not load the\n\t// log driver.\n\tErrorCodeLoggingFactory = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"LOGGINGFACTORY\",\n\t\tMessage:        \"Failed to get logging factory: %v\",\n\t\tDescription:    \"An attempt was made to register a container but the container's ID can not be an empty string\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeInitLogger is generated when we could not initialize\n\t// the logging driver.\n\tErrorCodeInitLogger = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"INITLOGGER\",\n\t\tMessage:        \"Failed to initialize logging driver: %v\",\n\t\tDescription:    \"An error occurred while trying to initialize the logging driver\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNotRunning is generated when we need to verify that\n\t// a container is running, but its not.\n\tErrorCodeNotRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOTRUNNING\",\n\t\tMessage:        \"Container %s is not running\",\n\t\tDescription:    \"The specified action can not be taken due to the container not being in a running state\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeLinkNotRunning is generated when we try to link to a\n\t// container that is not running.\n\tErrorCodeLinkNotRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"LINKNOTRUNNING\",\n\t\tMessage:        \"Cannot link to a non running container: %s AS %s\",\n\t\tDescription:    \"An attempt was made to link to a container but the container is not in a running state\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeDeviceInfo is generated when there is an error while trying\n\t// to get info about a custom device.\n\t// container that is not running.\n\tErrorCodeDeviceInfo = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"DEVICEINFO\",\n\t\tMessage:        \"error gathering device information while adding custom device %q: %s\",\n\t\tDescription:    \"There was an error while trying to retrieve the information about a custom device\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeEmptyEndpoint is generated when the endpoint for a port\n\t// map is nil.\n\tErrorCodeEmptyEndpoint = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EMPTYENDPOINT\",\n\t\tMessage:        \"invalid endpoint while building port map info\",\n\t\tDescription:    \"The specified endpoint for the port mapping is empty\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeEmptyNetwork is generated when the networkSettings for a port\n\t// map is nil.\n\tErrorCodeEmptyNetwork = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EMPTYNETWORK\",\n\t\tMessage:        \"invalid networksettings while building port map info\",\n\t\tDescription:    \"The specified endpoint for the port mapping is empty\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeParsingPort is generated when there is an error parsing\n\t// a \"port\" string.\n\tErrorCodeParsingPort = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"PARSINGPORT\",\n\t\tMessage:        \"Error parsing Port value(%v):%v\",\n\t\tDescription:    \"There was an error while trying to parse the specified 'port' value\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNoSandbox is generated when we can't find the specified\n\t// sandbox(network) by ID.\n\tErrorCodeNoSandbox = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOSANDBOX\",\n\t\tMessage:        \"error locating sandbox id %s: %v\",\n\t\tDescription:    \"There was an error trying to located the specified networking sandbox\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNetworkUpdate is generated when there is an error while\n\t// trying update a network/sandbox config.\n\tErrorCodeNetworkUpdate = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NETWORKUPDATE\",\n\t\tMessage:        \"Update network failed: %v\",\n\t\tDescription:    \"There was an error trying to update the configuration information of the specified network sandbox\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNetworkRefresh is generated when there is an error while\n\t// trying refresh a network/sandbox config.\n\tErrorCodeNetworkRefresh = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NETWORKREFRESH\",\n\t\tMessage:        \"Update network failed: Failure in refresh sandbox %s: %v\",\n\t\tDescription:    \"There was an error trying to refresh the configuration information of the specified network sandbox\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeHostPort is generated when there was an error while trying\n\t// to parse a \"host/port\" string.\n\tErrorCodeHostPort = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"HOSTPORT\",\n\t\tMessage:        \"Error parsing HostPort value(%s):%v\",\n\t\tDescription:    \"There was an error trying to parse the specified 'HostPort' value\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNetworkConflict is generated when we try to publish a service\n\t// in network mode.\n\tErrorCodeNetworkConflict = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NETWORKCONFLICT\",\n\t\tMessage:        \"conflicting options: publishing a service and network mode\",\n\t\tDescription:    \"It is not possible to publish a service when it is in network mode\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeJoinInfo is generated when we failed to update a container's\n\t// join info.\n\tErrorCodeJoinInfo = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"JOININFO\",\n\t\tMessage:        \"Updating join info failed: %v\",\n\t\tDescription:    \"There was an error during an attempt update a container's join information\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeIPCRunning is generated when we try to join a container's\n\t// IPC but it's not running.\n\tErrorCodeIPCRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"IPCRUNNING\",\n\t\tMessage:        \"cannot join IPC of a non running container: %s\",\n\t\tDescription:    \"An attempt was made to join the IPC of a container, but the container is not running\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeNotADir is generated when we try to create a directory\n\t// but the path isn't a dir.\n\tErrorCodeNotADir = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOTADIR\",\n\t\tMessage:        \"Cannot mkdir: %s is not a directory\",\n\t\tDescription:    \"An attempt was made create a directory, but the location in which it is being created is not a directory\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeParseContainer is generated when the reference to a\n\t// container doesn't include a \":\" (another container).\n\tErrorCodeParseContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"PARSECONTAINER\",\n\t\tMessage:        \"no container specified to join network\",\n\t\tDescription:    \"The specified reference to a container is missing a ':' as a separator between 'container' and 'name'/'id'\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeJoinSelf is generated when we try to network to ourselves.\n\tErrorCodeJoinSelf = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"JOINSELF\",\n\t\tMessage:        \"cannot join own network\",\n\t\tDescription:    \"An attempt was made to have a container join its own network\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeJoinRunning is generated when we try to network to ourselves.\n\tErrorCodeJoinRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"JOINRUNNING\",\n\t\tMessage:        \"cannot join network of a non running container: %s\",\n\t\tDescription:    \"An attempt to join the network of a container, but that container isn't running\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeModeNotContainer is generated when we try to network to\n\t// another container but the mode isn't 'container'.\n\tErrorCodeModeNotContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"MODENOTCONTAINER\",\n\t\tMessage:        \"network mode not set to container\",\n\t\tDescription:    \"An attempt was made to connect to a container's network but the mode wasn't set to 'container'\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRemovingVolume is generated when we try remove a mount\n\t// point (volume) but fail.\n\tErrorCodeRemovingVolume = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"REMOVINGVOLUME\",\n\t\tMessage:        \"Error removing volumes:\\n%v\",\n\t\tDescription:    \"There was an error while trying to remove the mount point (volume) of a container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeInvalidNetworkMode is generated when an invalid network\n\t// mode value is specified.\n\tErrorCodeInvalidNetworkMode = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"INVALIDNETWORKMODE\",\n\t\tMessage:        \"invalid network mode: %s\",\n\t\tDescription:    \"The specified networking mode is not valid\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeGetGraph is generated when there was an error while\n\t// trying to find a graph/image.\n\tErrorCodeGetGraph = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"GETGRAPH\",\n\t\tMessage:        \"Failed to graph.Get on ImageID %s - %s\",\n\t\tDescription:    \"There was an error trying to retrieve the image for the specified image ID\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeGetLayer is generated when there was an error while\n\t// trying to retrieve a particular layer of an image.\n\tErrorCodeGetLayer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"GETLAYER\",\n\t\tMessage:        \"Failed to get layer path from graphdriver %s for ImageID %s - %s\",\n\t\tDescription:    \"There was an error trying to retrieve the layer of the specified image\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodePutLayer is generated when there was an error while\n\t// trying to 'put' a particular layer of an image.\n\tErrorCodePutLayer = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"PUTLAYER\",\n\t\tMessage:        \"Failed to put layer path from graphdriver %s for ImageID %s - %s\",\n\t\tDescription:    \"There was an error trying to store a layer for the specified image\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeGetLayerMetadata is generated when there was an error while\n\t// trying to retrieve the metadata of a layer of an image.\n\tErrorCodeGetLayerMetadata = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"GETLAYERMETADATA\",\n\t\tMessage:        \"Failed to get layer metadata - %s\",\n\t\tDescription:    \"There was an error trying to retrieve the metadata of a layer for the specified image\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeEmptyConfig is generated when the input config data\n\t// is empty.\n\tErrorCodeEmptyConfig = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EMPTYCONFIG\",\n\t\tMessage:        \"Config cannot be empty in order to create a container\",\n\t\tDescription:    \"While trying to create a container, the specified configuration information was empty\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNoSuchImageHash is generated when we can't find the\n\t// specified image by its hash\n\tErrorCodeNoSuchImageHash = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOSUCHIMAGEHASH\",\n\t\tMessage:        \"No such image: %s\",\n\t\tDescription:    \"An attempt was made to find an image by its hash, but the lookup failed\",\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeNoSuchImageTag is generated when we can't find the\n\t// specified image byt its name/tag.\n\tErrorCodeNoSuchImageTag = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOSUCHIMAGETAG\",\n\t\tMessage:        \"No such image: %s:%s\",\n\t\tDescription:    \"An attempt was made to find an image by its name/tag, but the lookup failed\",\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeMountOverFile is generated when we try to mount a volume\n\t// over an existing file (but not a dir).\n\tErrorCodeMountOverFile = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"MOUNTOVERFILE\",\n\t\tMessage:        \"cannot mount volume over existing file, file exists %s\",\n\t\tDescription:    \"An attempt was made to mount a volume at the same location as a pre-existing file\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeMountSetup is generated when we can't define a mount point\n\t// due to the source and destination being undefined.\n\tErrorCodeMountSetup = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"MOUNTSETUP\",\n\t\tMessage:        \"Unable to setup mount point, neither source nor volume defined\",\n\t\tDescription:    \"An attempt was made to setup a mount point, but the source and destination are undefined\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeInvalidMode is generated when the mode of a volume/bind\n\t// mount is invalid.\n\tErrorCodeVolumeInvalidMode = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMEINVALIDMODE\",\n\t\tMessage:        \"invalid mode: %q\",\n\t\tDescription:    \"An invalid 'mode' was specified\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeInvalid is generated when the format fo the\n\t// volume specification isn't valid.\n\tErrorCodeVolumeInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMEINVALID\",\n\t\tMessage:        \"Invalid volume specification: '%s'\",\n\t\tDescription:    \"An invalid 'volume' was specified in the mount request\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeAbs is generated when path to a volume isn't absolute.\n\tErrorCodeVolumeAbs = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMEABS\",\n\t\tMessage:        \"Invalid volume destination path: '%s' mount path must be absolute.\",\n\t\tDescription:    \"An invalid 'destination' path was specified in the mount request, it must be an absolute path\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeName is generated when the name of named volume isn't valid.\n\tErrorCodeVolumeName = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUME_NAME_INVALID\",\n\t\tMessage:        \"%q includes invalid characters for a local volume name, only %q are allowed\",\n\t\tDescription:    \"The name of volume is invalid\",\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeVolumeSlash is generated when destination path to a volume is /\n\tErrorCodeVolumeSlash = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMESLASH\",\n\t\tMessage:        \"Invalid specification: destination can't be '/' in '%s'\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeDestIsC is generated the destination is c: (Windows specific)\n\tErrorCodeVolumeDestIsC = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMEDESTISC\",\n\t\tMessage:        \"Destination drive letter in '%s' cannot be c:\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeDestIsCRoot is generated the destination path is c:\\ (Windows specific)\n\tErrorCodeVolumeDestIsCRoot = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMEDESTISCROOT\",\n\t\tMessage:        `Destination path in '%s' cannot be c:\\`,\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeSourceNotFound is generated the source directory could not be found (Windows specific)\n\tErrorCodeVolumeSourceNotFound = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMESOURCENOTFOUND\",\n\t\tMessage:        \"Source directory '%s' could not be found: %s\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeSourceNotDirectory is generated the source is not a directory (Windows specific)\n\tErrorCodeVolumeSourceNotDirectory = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMESOURCENOTDIRECTORY\",\n\t\tMessage:        \"Source '%s' is not a directory\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeFromBlank is generated when path to a volume is blank.\n\tErrorCodeVolumeFromBlank = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMEFROMBLANK\",\n\t\tMessage:        \"malformed volumes-from specification: %q\",\n\t\tDescription:    \"An invalid 'destination' path was specified in the mount request, it must not be blank\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeMountDup is generated when we try to mount two mounts points\n\t// to the same path.\n\tErrorCodeMountDup = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"MOUNTDUP\",\n\t\tMessage:        \"Duplicate mount point '%s'\",\n\t\tDescription:    \"An attempt was made to mount a content but the specified destination location is already used in a previous mount\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeNoSourceForMount is generated when no source directory\n\t// for a volume mount was found. (Windows specific)\n\tErrorCodeVolumeNoSourceForMount = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMENOSOURCEFORMOUNT\",\n\t\tMessage:        \"No source for mount name '%s' driver %q destination '%s'\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeVolumeNameReservedWord is generated when the name in a volume\n\t// uses a reserved word for filenames. (Windows specific)\n\tErrorCodeVolumeNameReservedWord = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUMENAMERESERVEDWORD\",\n\t\tMessage:        \"Volume name %q cannot be a reserved word for Windows filenames\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCantPause is generated when there's an error while trying\n\t// to pause a container.\n\tErrorCodeCantPause = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANTPAUSE\",\n\t\tMessage:        \"Cannot pause container %s: %s\",\n\t\tDescription:    \"An error occurred while trying to pause the specified container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCantUnpause is generated when there's an error while trying\n\t// to unpause a container.\n\tErrorCodeCantUnpause = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANTUNPAUSE\",\n\t\tMessage:        \"Cannot unpause container %s: %s\",\n\t\tDescription:    \"An error occurred while trying to unpause the specified container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCantKill is generated when there's an error while trying\n\t// to kill a container.\n\tErrorCodeCantKill = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANTKILL\",\n\t\tMessage:        \"Cannot kill container %s: %s\",\n\t\tDescription:    \"An error occurred while trying to kill the specified container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCantUpdate is generated when there's an error while trying\n\t// to update a container.\n\tErrorCodeCantUpdate = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANTUPDATE\",\n\t\tMessage:        \"Cannot update container %s: %s\",\n\t\tDescription:    \"An error occurred while trying to update the specified container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\t// ErrorCodePSError is generated when trying to run 'ps'.\n\tErrorCodePSError = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"PSError\",\n\t\tMessage:        \"Error running ps: %s\",\n\t\tDescription:    \"There was an error trying to run the 'ps' command in the specified container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNoPID is generated when looking for the PID field in the\n\t// ps output.\n\tErrorCodeNoPID = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOPID\",\n\t\tMessage:        \"Couldn't find PID field in ps output\",\n\t\tDescription:    \"There was no 'PID' field in the output of the 'ps' command that was executed\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeBadPID is generated when we can't convert a PID to an int.\n\tErrorCodeBadPID = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"BADPID\",\n\t\tMessage:        \"Unexpected pid '%s': %s\",\n\t\tDescription:    \"While trying to parse the output of the 'ps' command, the 'PID' field was not an integer\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNoTop is generated when we try to run 'top' but can't\n\t// because we're on windows.\n\tErrorCodeNoTop = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOTOP\",\n\t\tMessage:        \"Top is not supported on Windows\",\n\t\tDescription:    \"The 'top' command is not supported on Windows\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeStopped is generated when we try to stop a container\n\t// that is already stopped.\n\tErrorCodeStopped = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"STOPPED\",\n\t\tMessage:        \"Container %s is already stopped\",\n\t\tDescription:    \"An attempt was made to stop a container, but the container is already stopped\",\n\t\tHTTPStatusCode: http.StatusNotModified,\n\t})\n\n\t// ErrorCodeCantStop is generated when we try to stop a container\n\t// but failed for some reason.\n\tErrorCodeCantStop = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANTSTOP\",\n\t\tMessage:        \"Cannot stop container %s: %s\\n\",\n\t\tDescription:    \"An error occurred while tring to stop the specified container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeBadCPUFields is generated when the number of CPU fields is\n\t// less than 8.\n\tErrorCodeBadCPUFields = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"BADCPUFIELDS\",\n\t\tMessage:        \"invalid number of cpu fields\",\n\t\tDescription:    \"While reading the '/proc/stat' file, the number of 'cpu' fields is less than 8\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeBadCPUInt is generated the CPU field can't be parsed as an int.\n\tErrorCodeBadCPUInt = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"BADCPUINT\",\n\t\tMessage:        \"Unable to convert value %s to int: %s\",\n\t\tDescription:    \"While reading the '/proc/stat' file, the 'CPU' field could not be parsed as an integer\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeBadStatFormat is generated the output of the stat info\n\t// isn't parseable.\n\tErrorCodeBadStatFormat = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"BADSTATFORMAT\",\n\t\tMessage:        \"invalid stat format\",\n\t\tDescription:    \"There was an error trying to parse the '/proc/stat' file\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeTimedOut is generated when a timer expires.\n\tErrorCodeTimedOut = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"TIMEDOUT\",\n\t\tMessage:        \"Timed out: %v\",\n\t\tDescription:    \"A timer expired\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeAlreadyRemoving is generated when we try to remove a\n\t// container that is already being removed.\n\tErrorCodeAlreadyRemoving = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"ALREADYREMOVING\",\n\t\tMessage:        \"Status is already RemovalInProgress\",\n\t\tDescription:    \"An attempt to remove a container was made, but the container is already in the process of being removed\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeStartPaused is generated when we start a paused container.\n\tErrorCodeStartPaused = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"STARTPAUSED\",\n\t\tMessage:        \"Cannot start a paused container, try unpause instead.\",\n\t\tDescription:    \"An attempt to start a container was made, but the container is paused. Unpause it first\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeAlreadyStarted is generated when we try to start a container\n\t// that is already running.\n\tErrorCodeAlreadyStarted = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"ALREADYSTARTED\",\n\t\tMessage:        \"Container already started\",\n\t\tDescription:    \"An attempt to start a container was made, but the container is already started\",\n\t\tHTTPStatusCode: http.StatusNotModified,\n\t})\n\n\t// ErrorCodeHostConfigStart is generated when a HostConfig is passed\n\t// into the start command.\n\tErrorCodeHostConfigStart = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"HOSTCONFIGSTART\",\n\t\tMessage:        \"Supplying a hostconfig on start is not supported. It should be supplied on create\",\n\t\tDescription:    \"The 'start' command does not accept 'HostConfig' data, try using the 'create' command instead\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCantRestart is generated when an error occurred while\n\t// trying to restart a container.\n\tErrorCodeCantRestart = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANTRESTART\",\n\t\tMessage:        \"Cannot restart container %s: %s\",\n\t\tDescription:    \"There was an error while trying to restart a container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeEmptyRename is generated when one of the names on a\n\t// rename is empty.\n\tErrorCodeEmptyRename = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EMPTYRENAME\",\n\t\tMessage:        \"Neither old nor new names may be empty\",\n\t\tDescription:    \"An attempt was made to rename a container but either the old or new names were blank\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRenameTaken is generated when we try to rename but the\n\t// new name isn't available.\n\tErrorCodeRenameTaken = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RENAMETAKEN\",\n\t\tMessage:        \"Error when allocating new name: %s\",\n\t\tDescription:    \"The new name specified on the 'rename' command is already being used\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRenameDelete is generated when we try to rename but\n\t// failed trying to delete the old container.\n\tErrorCodeRenameDelete = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RENAMEDELETE\",\n\t\tMessage:        \"Failed to delete container %q: %v\",\n\t\tDescription:    \"There was an error trying to delete the specified container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodePauseError is generated when we try to pause a container\n\t// but failed.\n\tErrorCodePauseError = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"PAUSEERROR\",\n\t\tMessage:        \"Cannot pause container %s: %s\",\n\t\tDescription:    \"There was an error trying to pause the specified container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNeedStream is generated when we try to stream a container's\n\t// logs but no output stream was specified.\n\tErrorCodeNeedStream = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NEEDSTREAM\",\n\t\tMessage:        \"You must choose at least one stream\",\n\t\tDescription:    \"While trying to stream a container's logs, no output stream was specified\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeDanglingOne is generated when we try to specify more than one\n\t// 'dangling' specifier.\n\tErrorCodeDanglingOne = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"DANLGINGONE\",\n\t\tMessage:        \"Conflict: cannot use more than 1 value for `dangling` filter\",\n\t\tDescription:    \"The specified 'dangling' filter may not have more than one value\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeImgDelUsed is generated when we try to delete an image\n\t// but it is being used.\n\tErrorCodeImgDelUsed = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"IMGDELUSED\",\n\t\tMessage:        \"conflict: unable to remove repository reference %q (must force) - container %s is using its referenced image %s\",\n\t\tDescription:    \"An attempt was made to delete an image but it is currently being used\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeImgNoParent is generated when we try to find an image's\n\t// parent but its not in the graph.\n\tErrorCodeImgNoParent = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"IMGNOPARENT\",\n\t\tMessage:        \"unable to get parent image: %v\",\n\t\tDescription:    \"There was an error trying to find an image's parent, it was not in the graph\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeExportFailed is generated when an export fails.\n\tErrorCodeExportFailed = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXPORTFAILED\",\n\t\tMessage:        \"%s: %s\",\n\t\tDescription:    \"There was an error during an export operation\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeExecResize is generated when we try to resize an exec\n\t// but its not running.\n\tErrorCodeExecResize = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXECRESIZE\",\n\t\tMessage:        \"Exec %s is not running, so it can not be resized.\",\n\t\tDescription:    \"An attempt was made to resize an 'exec', but the 'exec' is not running\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeContainerNotRunning is generated when we try to get the info\n\t// on an exec but the container is not running.\n\tErrorCodeContainerNotRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CONTAINERNOTRUNNING\",\n\t\tMessage:        \"Container %s is not running: %s\",\n\t\tDescription:    \"An attempt was made to retrieve the information about an 'exec' but the container is not running\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeContainerRestarting is generated when an operation was made\n\t// on a restarting container.\n\tErrorCodeContainerRestarting = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CONTAINERRESTARTING\",\n\t\tMessage:        \"Container %s is restarting, wait until the container is running\",\n\t\tDescription:    \"An operation was made on a restarting container\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeNoExecID is generated when we try to get the info\n\t// on an exec but it can't be found.\n\tErrorCodeNoExecID = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOEXECID\",\n\t\tMessage:        \"No such exec instance '%s' found in daemon\",\n\t\tDescription:    \"The specified 'exec' instance could not be found\",\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeExecPaused is generated when we try to start an exec\n\t// but the container is paused.\n\tErrorCodeExecPaused = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXECPAUSED\",\n\t\tMessage:        \"Container %s is paused, unpause the container before exec\",\n\t\tDescription:    \"An attempt to start an 'exec' was made, but the owning container is paused\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeExecRunning is generated when we try to start an exec\n\t// but its already running.\n\tErrorCodeExecRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXECRUNNING\",\n\t\tMessage:        \"Error: Exec command %s is already running\",\n\t\tDescription:    \"An attempt to start an 'exec' was made, but 'exec' is already running\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeExecExited is generated when we try to start an exec\n\t// but its already running.\n\tErrorCodeExecExited = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXECEXITED\",\n\t\tMessage:        \"Error: Exec command %s has already run\",\n\t\tDescription:    \"An attempt to start an 'exec' was made, but 'exec' was already run\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeExecCantRun is generated when we try to start an exec\n\t// but it failed for some reason.\n\tErrorCodeExecCantRun = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXECCANTRUN\",\n\t\tMessage:        \"Cannot run exec command %s in container %s: %s\",\n\t\tDescription:    \"An attempt to start an 'exec' was made, but an error occurred\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeExecAttach is generated when we try to attach to an exec\n\t// but failed.\n\tErrorCodeExecAttach = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXECATTACH\",\n\t\tMessage:        \"attach failed with error: %s\",\n\t\tDescription:    \"There was an error while trying to attach to an 'exec'\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeExecContainerStopped is generated when we try to start\n\t// an exec but then the container stopped.\n\tErrorCodeExecContainerStopped = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"EXECCONTAINERSTOPPED\",\n\t\tMessage:        \"container stopped while running exec\",\n\t\tDescription:    \"An attempt was made to start an 'exec' but the owning container is in the 'stopped' state\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeDefaultName is generated when we try to delete the\n\t// default name of a container.\n\tErrorCodeDefaultName = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"DEFAULTNAME\",\n\t\tMessage:        \"Conflict, cannot remove the default name of the container\",\n\t\tDescription:    \"An attempt to delete the default name of a container was made, but that is not allowed\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeNoParent is generated when we try to delete a container\n\t// but we can't find its parent image.\n\tErrorCodeNoParent = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOPARENT\",\n\t\tMessage:        \"Cannot get parent %s for name %s\",\n\t\tDescription:    \"An attempt was made to delete a container but its parent image could not be found\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCantDestroy is generated when we try to delete a container\n\t// but failed for some reason.\n\tErrorCodeCantDestroy = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANTDESTROY\",\n\t\tMessage:        \"Cannot destroy container %s: %v\",\n\t\tDescription:    \"An attempt was made to delete a container but it failed\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRmRunning is generated when we try to delete a container\n\t// but its still running.\n\tErrorCodeRmRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMRUNNING\",\n\t\tMessage:        \"You cannot remove a running container %s. Stop the container before attempting removal or use -f\",\n\t\tDescription:    \"An attempt was made to delete a container but the container is still running, try to either stop it first or use '-f'\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeRmFailed is generated when we try to delete a container\n\t// but it failed for some reason.\n\tErrorCodeRmFailed = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMFAILED\",\n\t\tMessage:        \"Could not kill running container %s, cannot remove - %v\",\n\t\tDescription:    \"An error occurred while trying to delete a running container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRmNotFound is generated when we try to delete a container\n\t// but couldn't find it.\n\tErrorCodeRmNotFound = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMNOTFOUND\",\n\t\tMessage:        \"Could not kill running container, cannot remove - %v\",\n\t\tDescription:    \"An attempt to delete a container was made but the container could not be found\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRmState is generated when we try to delete a container\n\t// but couldn't set its state to RemovalInProgress.\n\tErrorCodeRmState = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMSTATE\",\n\t\tMessage:        \"Failed to set container %s state to RemovalInProgress: %s\",\n\t\tDescription:    \"An attempt to delete a container was made, but there as an error trying to set its state to 'RemovalInProgress'\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRmDriverFS is generated when we try to delete a container\n\t// but the driver failed to delete its filesystem.\n\tErrorCodeRmDriverFS = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMDRIVERFS\",\n\t\tMessage:        \"Driver %s failed to remove root filesystem %s: %s\",\n\t\tDescription:    \"While trying to delete a container, the driver failed to remove the root filesystem\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRmFS is generated when we try to delete a container\n\t// but failed deleting its filesystem.\n\tErrorCodeRmFS = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMFS\",\n\t\tMessage:        \"Unable to remove filesystem for %v: %v\",\n\t\tDescription:    \"While trying to delete a container, the driver failed to remove the filesystem\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRmExecDriver is generated when we try to delete a container\n\t// but failed deleting its exec driver data.\n\tErrorCodeRmExecDriver = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMEXECDRIVER\",\n\t\tMessage:        \"Unable to remove execdriver data for %s: %s\",\n\t\tDescription:    \"While trying to delete a container, there was an error trying to remove th exec driver data\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeRmVolumeInUse is generated when we try to delete a container\n\t// but failed deleting a volume because its being used.\n\tErrorCodeRmVolumeInUse = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMVOLUMEINUSE\",\n\t\tMessage:        \"Conflict: %v\",\n\t\tDescription:    \"While trying to delete a container, one of its volumes is still being used\",\n\t\tHTTPStatusCode: http.StatusConflict,\n\t})\n\n\t// ErrorCodeRmVolume is generated when we try to delete a container\n\t// but failed deleting a volume.\n\tErrorCodeRmVolume = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"RMVOLUME\",\n\t\tMessage:        \"Error while removing volume %s: %v\",\n\t\tDescription:    \"While trying to delete a container, there was an error trying to delete one of its volumes\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeInvalidCpusetCpus is generated when user provided cpuset CPUs\n\t// are invalid.\n\tErrorCodeInvalidCpusetCpus = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"INVALIDCPUSETCPUS\",\n\t\tMessage:        \"Invalid value %s for cpuset cpus.\",\n\t\tDescription:    \"While verifying the container's 'HostConfig', CpusetCpus value was in an incorrect format\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeInvalidCpusetMems is generated when user provided cpuset mems\n\t// are invalid.\n\tErrorCodeInvalidCpusetMems = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"INVALIDCPUSETMEMS\",\n\t\tMessage:        \"Invalid value %s for cpuset mems.\",\n\t\tDescription:    \"While verifying the container's 'HostConfig', CpusetMems value was in an incorrect format\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNotAvailableCpusetCpus is generated when user provided cpuset\n\t// CPUs aren't available in the container's cgroup.\n\tErrorCodeNotAvailableCpusetCpus = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOTAVAILABLECPUSETCPUS\",\n\t\tMessage:        \"Requested CPUs are not available - requested %s, available: %s.\",\n\t\tDescription:    \"While verifying the container's 'HostConfig', cpuset CPUs provided aren't available in the container's cgroup available set\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeNotAvailableCpusetMems is generated when user provided cpuset\n\t// memory nodes aren't available in the container's cgroup.\n\tErrorCodeNotAvailableCpusetMems = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NOTAVAILABLECPUSETMEMS\",\n\t\tMessage:        \"Requested memory nodes are not available - requested %s, available: %s.\",\n\t\tDescription:    \"While verifying the container's 'HostConfig', cpuset memory nodes provided aren't available in the container's cgroup available set\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorVolumeNameTaken is generated when an error occurred while\n\t// trying to create a volume that has existed using different driver.\n\tErrorVolumeNameTaken = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"VOLUME_NAME_TAKEN\",\n\t\tMessage:        \"A volume named %s already exists. Choose a different volume name.\",\n\t\tDescription:    \"An attempt to create a volume using a driver but the volume already exists with a different driver\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCmdNotFound is generated when container cmd can't start,\n\t// container command not found error, exit code 127\n\tErrorCodeCmdNotFound = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CMDNOTFOUND\",\n\t\tMessage:        \"Container command not found or does not exist.\",\n\t\tDescription:    \"Command could not be found, command does not exist\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCmdCouldNotBeInvoked is generated when container cmd can't start,\n\t// container command permission denied error, exit code 126\n\tErrorCodeCmdCouldNotBeInvoked = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CMDCOULDNOTBEINVOKED\",\n\t\tMessage:        \"Container command could not be invoked.\",\n\t\tDescription:    \"Permission denied, cannot invoke command\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCantStart is generated when container cmd can't start,\n\t// for any reason other than above 2 errors\n\tErrorCodeCantStart = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANTSTART\",\n\t\tMessage:        \"Cannot start container %s: %s\",\n\t\tDescription:    \"There was an error while trying to start a container\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeCantDeletePredefinedNetwork is generated when one of the predefined networks\n\t// is attempted to be deleted.\n\tErrorCodeCantDeletePredefinedNetwork = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANT_DELETE_PREDEFINED_NETWORK\",\n\t\tMessage:        \"%s is a pre-defined network and cannot be removed\",\n\t\tDescription:    \"Engine's predefined networks cannot be deleted\",\n\t\tHTTPStatusCode: http.StatusForbidden,\n\t})\n\n\t// ErrorCodeMultipleNetworkConnect is generated when more than one network is passed\n\t// when creating a container\n\tErrorCodeMultipleNetworkConnect = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"CANNOT_CONNECT_TO_MULTIPLE_NETWORKS\",\n\t\tMessage:        \"Container cannot be connected to %s\",\n\t\tDescription:    \"A container can only be connected to one network at the time\",\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n)\n```\n\n```go\nvar (\n\t// ErrorCodeNewerClientVersion is generated when a request from a client\n\t// specifies a higher version than the server supports.\n\tErrorCodeNewerClientVersion = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NEWERCLIENTVERSION\",\n\t\tMessage:        \"client is newer than server (client API version: %s, server API version: %s)\",\n\t\tDescription:    \"The client version is higher than the server version\",\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeOldClientVersion is generated when a request from a client\n\t// specifies a version lower than the minimum version supported by the server.\n\tErrorCodeOldClientVersion = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"OLDCLIENTVERSION\",\n\t\tMessage:        \"client version %s is too old. Minimum supported API version is %s, please upgrade your client to a newer version\",\n\t\tDescription:    \"The client version is too old for the server\",\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorNetworkControllerNotEnabled is generated when the networking stack in not enabled\n\t// for certain platforms, like windows.\n\tErrorNetworkControllerNotEnabled = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"NETWORK_CONTROLLER_NOT_ENABLED\",\n\t\tMessage:        \"the network controller is not enabled for this platform\",\n\t\tDescription:    \"Hyper's networking stack is disabled for this platform\",\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeNoHijackConnection is generated when a request tries to attach to a container\n\t// but the connection to hijack is not provided.\n\tErrorCodeNoHijackConnection = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"HIJACK_CONNECTION_MISSING\",\n\t\tMessage:        \"error attaching to container %s, hijack connection missing\",\n\t\tDescription:    \"The caller didn't provide a connection to hijack\",\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n)\n```\n\n```go\nvar (\n\t// ErrorCodeInvalidImageID is generated when image id specified is incorrectly formatted.\n\tErrorCodeInvalidImageID = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:          \"INVALIDIMAGEID\",\n\t\tMessage:        \"image ID '%s' is invalid \",\n\t\tDescription:    \"The specified image id is incorrectly formatted\",\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n)\n```\n\n","path":"github.com/hyperhq/hypercli/errors","name":"errors","synopsis":"","isRedistributable":true}
