Skip to content

Commit

Permalink
getBearerToken returns http response error
Browse files Browse the repository at this point in the history
fix containers/podman#3884
Returns http response error message from  server-side.

Signed-off-by: Qi Wang <[email protected]>
  • Loading branch information
QiWang19 committed Sep 26, 2019
1 parent ddb11c0 commit cefef03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,8 @@ func (c *dockerClient) getBearerToken(ctx context.Context, challenge challenge,
defer res.Body.Close()
switch res.StatusCode {
case http.StatusUnauthorized:
return nil, ErrUnauthorizedForCredentials
err := client.HandleErrorResponse(res)
return nil, err
case http.StatusOK:
break
default:
Expand Down

0 comments on commit cefef03

Please sign in to comment.