Skip to content

Commit

Permalink
Scope the response to be within the retry loop
Browse files Browse the repository at this point in the history
  • Loading branch information
triarius committed Nov 14, 2022
1 parent 5b860fb commit 15bc08d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clicommand/oidc_request_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ var OIDCRequestTokenCommand = cli.Command{

// Request the token
var token *api.OIDCToken
var resp *api.Response

if err := roko.NewRetrier(
roko.WithMaxAttempts(maxAttempts),
Expand All @@ -118,6 +117,7 @@ var OIDCRequestTokenCommand = cli.Command{
Audience: cfg.Audience,
}

var resp *api.Response
token, resp, err = client.OIDCToken(req)
if resp != nil {
switch resp.StatusCode {
Expand Down

0 comments on commit 15bc08d

Please sign in to comment.