Skip to content

Commit

Permalink
add http response to log
Browse files Browse the repository at this point in the history
fix containers/podman#3884
Add http response message log to show server-side error message.

Signed-off-by: Qi Wang <[email protected]>
  • Loading branch information
QiWang19 committed Sep 27, 2019
1 parent ddb11c0 commit d855fc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.Errorf("Server response when trying to obtain an access token: \n%q", err)
return nil, ErrUnauthorizedForCredentials
case http.StatusOK:
break
Expand Down

0 comments on commit d855fc3

Please sign in to comment.