errors

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCodeCommon = errcode.Register(errGroup, errcode.ErrorDescriptor{
		Value:          "COMMONERROR",
		Message:        "%v",
		HTTPStatusCode: http.StatusInternalServerError,
	})

	ErrPodNotFound = errcode.Register(errGroup, errcode.ErrorDescriptor{
		Value:          "HYPER_POD_NOT_FOUND",
		Message:        "Pod %s not found",
		HTTPStatusCode: http.StatusNotFound,
	})

	ErrBadJsonFormat = errcode.Register(errGroup, errcode.ErrorDescriptor{
		Value:          "HYPER_BAD_JSON_FORMAT",
		Message:        "failed to parse json: %v",
		HTTPStatusCode: http.StatusBadRequest,
	})

	ErrSandboxNotExist = errcode.Register(errGroup, errcode.ErrorDescriptor{
		Value:          "HYPER_SANDBOX_NOT_EXIST",
		Message:        "sandbox does not exist",
		HTTPStatusCode: http.StatusPreconditionFailed,
	})

	ErrPodNotAlive = errcode.Register(errGroup, errcode.ErrorDescriptor{
		Value:          "HYPER_POD_NOT_ALIVE",
		Message:        "cannot complete the operation, because the pod %s is not alive",
		HTTPStatusCode: http.StatusPreconditionFailed,
	})

	ErrPodNotRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{
		Value:          "HYPER_POD_NOT_RUNNING",
		Message:        "cannot complete the operation, because the pod %s is not running",
		HTTPStatusCode: http.StatusPreconditionFailed,
	})

	ErrContainerAlreadyRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{
		Value:          "HYPER_CONTAINER_RUNNING",
		Message:        "container %s is in running state",
		HTTPStatusCode: http.StatusPreconditionFailed,
	})
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL