make network connect error message readable

Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud 2016-12-27 19:46:10 +08:00
parent 176088a742
commit 7c85ed3eac

View file

@ -885,7 +885,7 @@ func (n *network) CreateEndpoint(name string, options ...EndpointOption) (Endpoi
}
if _, err = n.EndpointByName(name); err == nil {
return nil, types.ForbiddenErrorf("service endpoint with name %s already exists", name)
return nil, types.ForbiddenErrorf("endpoint with name %s already exists in network %s", name, n.Name())
}
ep := &endpoint{name: name, generic: make(map[string]interface{}), iface: &endpointInterface{}}