Skip to content

Commit

Permalink
return nil instead of op, which is an interface containing nil
Browse files Browse the repository at this point in the history
  • Loading branch information
megan07 authored Dec 10, 2019
2 parents 43d9f58 + dd345f6 commit 806c3d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/common_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func CommonRefreshFunc(w Waiter) resource.StateRefreshFunc {
for _, e := range getAllTypes(err, &googleapi.Error{}, &url.Error{}) {
if isRetryableError(e, predicates) {
log.Printf("[DEBUG] Dismissed error on GET of operation '%v' retryable: %s", w.OpName(), err)
return op, "done: false", nil
return nil, "done: false", nil
}
}

Expand All @@ -131,7 +131,7 @@ func CommonRefreshFunc(w Waiter) resource.StateRefreshFunc {
if err = w.Error(); err != nil {
if w.IsRetryable(err) {
log.Printf("[DEBUG] Retrying operation GET based on retryable err: %s", err)
return op, w.State(), nil
return nil, w.State(), nil
}
return nil, "", err
}
Expand Down

0 comments on commit 806c3d7

Please sign in to comment.