From acfb0eecd8eddd273a3aa26c058a4d7baf641b7b Mon Sep 17 00:00:00 2001 From: Qi Wang <qiwan@redhat.com> 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 <qiwan@redhat.com> --- docker/docker_client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/docker_client.go b/docker/docker_client.go index 48427f3d37..104e1da77a 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) return nil, ErrUnauthorizedForCredentials case http.StatusOK: break