From 618003c1a9599acd968db301c50a4304965bfc01 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Tue, 24 Sep 2019 15:26:23 -0400 Subject: [PATCH] add http response to log fix https://github.com/containers/libpod/issues/3884 Add http response message log to show server-side error message. Signed-off-by: Qi Wang --- docker/docker_client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/docker_client.go b/docker/docker_client.go index 48427f3d37..a7f29b1f32 100644 --- a/docker/docker_client.go +++ b/docker/docker_client.go @@ -533,6 +533,8 @@ func (c *dockerClient) getBearerToken(ctx context.Context, challenge challenge, defer res.Body.Close() switch res.StatusCode { case http.StatusUnauthorized: + err := client.HandleErrorResponse(res) + logrus.Debugf("Server response when trying to obtain an access token: \n%q", err.Error()) return nil, ErrUnauthorizedForCredentials case http.StatusOK: break