diff --git a/libnetwork/endpoint.go b/libnetwork/endpoint.go index cfbab0edc7..1dbfe44a31 100644 --- a/libnetwork/endpoint.go +++ b/libnetwork/endpoint.go @@ -286,7 +286,7 @@ func (ep *endpoint) sbJoin(sbox Sandbox, options ...EndpointOption) error { ep.Lock() if ep.sandboxID != "" { ep.Unlock() - return types.ForbiddenErrorf("a sandbox has already joined the endpoint") + return types.ForbiddenErrorf("another container is attached to the same network endpoint") } ep.Unlock() diff --git a/libnetwork/error.go b/libnetwork/error.go index d31a50948b..4158c9956c 100644 --- a/libnetwork/error.go +++ b/libnetwork/error.go @@ -129,7 +129,7 @@ type ActiveEndpointsError struct { } func (aee *ActiveEndpointsError) Error() string { - return fmt.Sprintf("network with name %s id %s has active endpoints", aee.name, aee.id) + return fmt.Sprintf("network %s has active endpoints", aee.name) } // Forbidden denotes the type of this error