diff --git a/libnetwork/error.go b/libnetwork/error.go index b1a8ea0e2918287e1ca836b9176f5ba257eacdb9..54a2c960ed5546e3ba9f5ca99490097c23f061dd 100644 --- a/libnetwork/error.go +++ b/libnetwork/error.go @@ -25,17 +25,6 @@ func (nse ErrNoSuchEndpoint) Error() string { // NotFound denotes the type of this error func (nse ErrNoSuchEndpoint) NotFound() {} -// ErrNoContainer is returned when the endpoint has no container -// attached to it. -type ErrNoContainer struct{} - -func (nc ErrNoContainer) Error() string { - return "no container is attached to the endpoint" -} - -// Maskable denotes the type of this error -func (nc ErrNoContainer) Maskable() {} - // ErrInvalidID is returned when a query-by-id method is being invoked // with an empty id parameter type ErrInvalidID string diff --git a/libnetwork/errors_test.go b/libnetwork/errors_test.go index 53bb081b4cb51085cd1a50384178ddb83c439617..d20f3bc939ff107df84aee34d57ad605a963016e 100644 --- a/libnetwork/errors_test.go +++ b/libnetwork/errors_test.go @@ -16,7 +16,7 @@ func TestErrorInterfaces(t *testing.T) { } } - maskableErrorList := []error{ErrNoContainer{}} + maskableErrorList := []error{ManagerRedirectError("")} for _, err := range maskableErrorList { switch u := err.(type) { case types.MaskableError: