Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hickford committed Mar 5, 2023
1 parent 8c7208a commit 66b50b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ func (c *Config) Poll(ctx context.Context, da *DeviceAuthResponse, opts ...AuthC
return tok, nil
}

e, _ := err.(*RetrieveError)
e, ok := err.(*RetrieveError)
if !ok {
return nil, err
}
switch e.ErrorCode {
case errSlowDown:
interval += 5
Expand Down

0 comments on commit 66b50b5

Please sign in to comment.