mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
improve error message
This commit is contained in:
parent
5fb6d6e47c
commit
6a9fb81c57
1 changed files with 3 additions and 0 deletions
|
@ -355,6 +355,9 @@ func (runtime *Runtime) Create(config *Config, name string) (*Container, []strin
|
|||
|
||||
// Set the enitity in the graph using the default name specified
|
||||
if _, err := runtime.containerGraph.Set(name, id); err != nil {
|
||||
if strings.HasSuffix(err.Error(), "name are not unique") {
|
||||
return nil, nil, fmt.Errorf("Conflict, %s already exists.", name)
|
||||
}
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue