Skip to content

Commit

Permalink
Add 500 check for registry api call
Browse files Browse the repository at this point in the history
Partially Addresses moby#14326

Signed-off-by: Ankush Agarwal <[email protected]>
  • Loading branch information
ankushagarwal committed Jul 2, 2015
1 parent 71f8ca3 commit 88f02c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions registry/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 88f02c2

Please sign in to comment.