Skip to content

Commit e1f1537

Browse files
mark nil errors as nil instead of non-retryable (#4124) (#2618)
Signed-off-by: Modular Magician <[email protected]>
1 parent 2fd3bea commit e1f1537

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changelog/4124.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
all: fixed misleading "empty non-retryable error" message that was appearing in debug logs
3+
```

google-beta/retry_transport.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ func (t *retryTransport) checkForRetryableError(resp *http.Response, respErr err
201201
errToCheck = googleapi.CheckResponse(&respToCheck)
202202
}
203203

204+
if errToCheck == nil {
205+
return nil
206+
}
204207
if isRetryableError(errToCheck, t.retryPredicates...) {
205208
return resource.RetryableError(errToCheck)
206209
}

0 commit comments

Comments
 (0)