mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #18451 from WeiZhang555/net-err
Better error message for network connect
This commit is contained in:
commit
7d6a2e3cf5
1 changed files with 1 additions and 1 deletions
|
@ -616,7 +616,7 @@ func (daemon *Daemon) connectToNetwork(container *container.Container, idOrName
|
||||||
|
|
||||||
ep, err := container.GetEndpointInNetwork(n)
|
ep, err := container.GetEndpointInNetwork(n)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return fmt.Errorf("container already connected to network %s", idOrName)
|
return fmt.Errorf("Conflict. A container with name %q is already connected to network %s.", strings.TrimPrefix(container.Name, "/"), idOrName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := err.(libnetwork.ErrNoSuchEndpoint); !ok {
|
if _, ok := err.(libnetwork.ErrNoSuchEndpoint); !ok {
|
||||||
|
|
Loading…
Add table
Reference in a new issue