diff --git a/client/registry_login.go b/client/registry_login.go index b948e1add..69874d4c5 100644 --- a/client/registry_login.go +++ b/client/registry_login.go @@ -2,7 +2,6 @@ package client import ( "context" - "net/http" "github.com/alibaba/pouch/apis/types" ) @@ -10,7 +9,7 @@ import ( // RegistryLogin authenticates the server with a given registry to login. func (client *APIClient) RegistryLogin(ctx context.Context, auth *types.AuthConfig) (*types.AuthResponse, error) { resp, err := client.post(ctx, "/auth", nil, auth, nil) - if err != nil || resp.StatusCode == http.StatusUnauthorized { + if err != nil { return nil, err }