github.com/alexandrev/docker@v1.9.0/errors/server.go (about)

     1  package errors
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"github.com/docker/distribution/registry/api/errcode"
     7  )
     8  
     9  var (
    10  	// ErrorCodeNewerClientVersion is generated when a request from a client
    11  	// specifies a higher version than the server supports.
    12  	ErrorCodeNewerClientVersion = errcode.Register(errGroup, errcode.ErrorDescriptor{
    13  		Value:          "NEWERCLIENTVERSION",
    14  		Message:        "client is newer than server (client API version: %s, server API version: %s)",
    15  		Description:    "The client version is higher than the server version",
    16  		HTTPStatusCode: http.StatusBadRequest,
    17  	})
    18  
    19  	// ErrorCodeOldClientVersion is generated when a request from a client
    20  	// specifies a version lower than the minimum version supported by the server.
    21  	ErrorCodeOldClientVersion = errcode.Register(errGroup, errcode.ErrorDescriptor{
    22  		Value:          "OLDCLIENTVERSION",
    23  		Message:        "client version %s is too old. Minimum supported API version is %s, please upgrade your client to a newer version",
    24  		Description:    "The client version is too old for the server",
    25  		HTTPStatusCode: http.StatusBadRequest,
    26  	})
    27  
    28  	// ErrorNetworkControllerNotEnabled is generated when the networking stack in not enabled
    29  	// for certain platforms, like windows.
    30  	ErrorNetworkControllerNotEnabled = errcode.Register(errGroup, errcode.ErrorDescriptor{
    31  		Value:          "NETWORK_CONTROLLER_NOT_ENABLED",
    32  		Message:        "the network controller is not enabled for this platform",
    33  		Description:    "Docker's networking stack is disabled for this platform",
    34  		HTTPStatusCode: http.StatusNotFound,
    35  	})
    36  )