Skip to content

Commit

Permalink
mark nil errors as nil instead of non-retryable (#4124) (#2618)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 19, 2020
1 parent 2fd3bea commit e1f1537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/4124.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
all: fixed misleading "empty non-retryable error" message that was appearing in debug logs
```
3 changes: 3 additions & 0 deletions google-beta/retry_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ func (t *retryTransport) checkForRetryableError(resp *http.Response, respErr err
errToCheck = googleapi.CheckResponse(&respToCheck)
}

if errToCheck == nil {
return nil
}
if isRetryableError(errToCheck, t.retryPredicates...) {
return resource.RetryableError(errToCheck)
}
Expand Down

0 comments on commit e1f1537

Please sign in to comment.