mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
runconfig: remove exported errors
These errors were not used as sentinel error, and used as any other "invalid parameter" / "invalid argument" error, so remove them, and just produce errors where used. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -23,7 +23,6 @@ import (
|
||||
"github.com/docker/docker/daemon/internal/otelutil"
|
||||
"github.com/docker/docker/daemon/server/backend"
|
||||
"github.com/docker/docker/errdefs"
|
||||
"github.com/docker/docker/runconfig"
|
||||
containertypes "github.com/moby/moby/api/types/container"
|
||||
"github.com/moby/moby/api/types/events"
|
||||
networktypes "github.com/moby/moby/api/types/network"
|
||||
@@ -77,7 +76,7 @@ func (daemon *Daemon) containerCreate(ctx context.Context, daemonCfg *configStor
|
||||
|
||||
start := time.Now()
|
||||
if opts.params.Config == nil {
|
||||
return containertypes.CreateResponse{}, errdefs.InvalidParameter(runconfig.ErrEmptyConfig)
|
||||
return containertypes.CreateResponse{}, errdefs.InvalidParameter(errors.New("config cannot be empty in order to create a container"))
|
||||
}
|
||||
|
||||
// Normalize some defaults. Doing this "ad-hoc" here for now, as there's
|
||||
|
||||
Reference in New Issue
Block a user