MCPcopy Index your code
hub / github.com/rclone/rclone / ShouldRetryHTTP

Function ShouldRetryHTTP

fs/fserrors/error.go:439–444  ·  view source on GitHub ↗

ShouldRetryHTTP returns a boolean as to whether this resp deserves. It checks to see if the HTTP response code is in the slice retryErrorCodes.

(resp *http.Response, retryErrorCodes []int)

Source from the content-addressed store, hash-verified

437// It checks to see if the HTTP response code is in the slice
438// retryErrorCodes.
439func ShouldRetryHTTP(resp *http.Response, retryErrorCodes []int) bool {
440 if resp == nil {
441 return false
442 }
443 return slices.Contains(retryErrorCodes, resp.StatusCode)
444}
445
446// ContextError checks to see if ctx is in error.
447//

Callers 15

shouldRetryFunction · 0.92
shouldRetryMethod · 0.92
shouldRetryFunction · 0.92
shouldRetryFunction · 0.92
shouldRetryFunction · 0.92
shouldRetryMethod · 0.92
shouldRetryFunction · 0.92
shouldRetryFunction · 0.92
shouldRetryFunction · 0.92
shouldRetryNoReauthMethod · 0.92
shouldRetryFunction · 0.92
shouldRetryFunction · 0.92

Calls 1

ContainsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…