improve error message
This commit is contained in:
parent
b2503a72f1
commit
8fa6e2b103
|
@ -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
|
// Set the enitity in the graph using the default name specified
|
||||||
if _, err := runtime.containerGraph.Set(name, id); err != nil {
|
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
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue