docker/cli ยท error
invalid field in config request: %s
Error message
invalid field in config request: %s
What it means
Error "invalid field in config request: %s" thrown in docker/cli.
Source
Thrown at opts/swarmopts/config.go:67
// TODO(thaJeztah): these options should not be case-insensitive.
switch strings.ToLower(key) {
case "source", "src":
options.ConfigName = val
case "target":
options.File.Name = val
case "uid":
options.File.UID = val
case "gid":
options.File.GID = val
case "mode":
m, err := strconv.ParseUint(val, 0, 32)
if err != nil {
return fmt.Errorf("invalid mode specified: %v", err)
}
options.File.Mode = os.FileMode(m)
default:
return fmt.Errorf("invalid field in config request: %s", key)
}
}
if options.ConfigName == "" {
return errors.New("source is required")
}
if options.File.Name == "" {
options.File.Name = options.ConfigName
}
o.values = append(o.values, options)
return nil
}
// Type returns the type of this option
func (*ConfigOpt) Type() string {
return "config"
}View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at opts/swarmopts/config.go:67 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/4024d48f8f272eaa.json.
Report an issue: GitHub.