forked from openshift/geard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
26 lines (23 loc) · 2.01 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package jobs
import (
"github.com/openshift/geard/jobs"
)
var (
ErrContainerNotFound = jobs.SimpleError{jobs.ResponseNotFound, "The specified container does not exist."}
ErrContainerAlreadyExists = jobs.SimpleError{jobs.ResponseAlreadyExists, "A container with this identifier already exists."}
ErrContainerStartFailed = jobs.SimpleError{jobs.ResponseError, "Unable to start this container."}
ErrContainerStopFailed = jobs.SimpleError{jobs.ResponseError, "Unable to stop this container."}
ErrContainerRestartFailed = jobs.SimpleError{jobs.ResponseError, "Unable to restart this container."}
ErrEnvironmentNotFound = jobs.SimpleError{jobs.ResponseNotFound, "Unable to find the requested environment."}
ErrEnvironmentUpdateFailed = jobs.SimpleError{jobs.ResponseError, "Unable to update the specified environment."}
ErrListImagesFailed = jobs.SimpleError{jobs.ResponseError, "Unable to list docker images."}
ErrListContainersFailed = jobs.SimpleError{jobs.ResponseError, "Unable to list the installed containers."}
ErrStartRequestThrottled = jobs.SimpleError{jobs.ResponseRateLimit, "It has been too soon since the last request to start."}
ErrStopRequestThrottled = jobs.SimpleError{jobs.ResponseRateLimit, "It has been too soon since the last request to stop."}
ErrRestartRequestThrottled = jobs.SimpleError{jobs.ResponseRateLimit, "It has been too soon since the last request to restart or the state is currently changing."}
ErrLinkContainersFailed = jobs.SimpleError{jobs.ResponseError, "Not all links could be set."}
ErrDeleteContainerFailed = jobs.SimpleError{jobs.ResponseError, "Unable to delete the container."}
ErrContainerCreateFailed = jobs.SimpleError{jobs.ResponseError, "Unable to create container."}
ErrContainerCreateFailedInvalidSlice = jobs.SimpleError{jobs.ResponseError, "Provided systemd slice is not installed on system."}
ErrContainerCreateFailedPortsReserved = jobs.SimpleError{jobs.ResponseError, "Unable to create container: some ports could not be reserved."}
)