improve error message
Upstream-commit: 6a9fb81c5794166fc62e8fc5c638127d69f13eee Component: engine
This commit is contained in:
committed by
Michael Crosby
parent
da9e3155ba
commit
eabb6b91bc
@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user