mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add 500 check for registry api call
Partially Addresses #14326 Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
This commit is contained in:
parent
71f8ca30ce
commit
88f02c2f33
1 changed files with 3 additions and 0 deletions
|
@ -180,6 +180,9 @@ func loginV1(authConfig *cliconfig.AuthConfig, registryEndpoint *Endpoint) (stri
|
||||||
}
|
}
|
||||||
// *TODO: Use registry configuration to determine what this says, if anything?
|
// *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)
|
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)
|
return "", fmt.Errorf("Login: %s (Code: %d; Headers: %s)", body, resp.StatusCode, resp.Header)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue