Skip to content

Commit

Permalink
Fix unexpected status code handling for login
Browse files Browse the repository at this point in the history
  • Loading branch information
pmatseykanets committed Jan 9, 2025
1 parent 1ecadcc commit 649c29d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/kubectl_token_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func rancherLogin(client *http.Client, input *LoginInput, provider TypedProvider

resp, respBody, err := doRequest(client, req)
if err == nil && resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("unexpected http status code %d", resp.StatusCode)
err = fmt.Errorf("unexpected http status code %d", resp.StatusCode)
}
if err != nil {
return nil, err
Expand Down

0 comments on commit 649c29d

Please sign in to comment.