From 88f02c2f33ff5caf69b93e667b52ab50e5e386ad Mon Sep 17 00:00:00 2001 From: Ankush Agarwal Date: Wed, 1 Jul 2015 13:02:55 -0700 Subject: [PATCH] Add 500 check for registry api call Partially Addresses #14326 Signed-off-by: Ankush Agarwal --- registry/auth.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/registry/auth.go b/registry/auth.go index 66b3438f22..65991d6964 100644 --- a/registry/auth.go +++ b/registry/auth.go @@ -180,6 +180,9 @@ func loginV1(authConfig *cliconfig.AuthConfig, registryEndpoint *Endpoint) (stri } // *TODO: Use registry configuration to determine what this says, if anything? return "", fmt.Errorf("Login: Account is not Active. Please see the documentation of the registry %s for instructions how to activate it.", serverAddress) + } else if resp.StatusCode == 500 { // Issue #14326 + logrus.Errorf("%s returned status code %d. Response Body :\n%s", req.URL.String(), resp.StatusCode, body) + return "", fmt.Errorf("Internal Server Error") } return "", fmt.Errorf("Login: %s (Code: %d; Headers: %s)", body, resp.StatusCode, resp.Header) }