MCPcopy
hub / github.com/rclone/rclone / shouldRetry

Function shouldRetry

backend/oracleobjectstorage/client.go:109–126  ·  view source on GitHub ↗
(ctx context.Context, resp *http.Response, err error)

Source from the content-addressed store, hash-verified

107}
108
109func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, error) {
110 if fserrors.ContextError(ctx, &err) {
111 return false, err
112 }
113 // If this is an ocierr object, try and extract more useful information to determine if we should retry
114 if ociError, ok := err.(common.ServiceError); ok {
115 // Simple case, check the original embedded error in case it's generically retryable
116 if fserrors.ShouldRetry(err) {
117 return true, err
118 }
119 // If it is a timeout then we want to retry that
120 if ociError.GetCode() == "RequestTimeout" {
121 return true, err
122 }
123 }
124 // Ok, not an oci error, check for generic failure conditions
125 return fserrors.ShouldRetry(err) || fserrors.ShouldRetryHTTP(resp, retryErrorCodes), err
126}
127
128func getNoAuthConfiguration() (common.ConfigurationProvider, error) {
129 return &noAuthConfigurator{}, nil

Callers 15

WriteChunkMethod · 0.70
CloseMethod · 0.70
createMultipartUploadMethod · 0.70
copyMethod · 0.70
headObjectMethod · 0.70
RemoveMethod · 0.70
OpenMethod · 0.70
UpdateMethod · 0.70
listMethod · 0.70
listBucketsMethod · 0.70
makeBucketMethod · 0.70
bucketExistsMethod · 0.70

Calls 4

ContextErrorFunction · 0.92
ShouldRetryFunction · 0.92
ShouldRetryHTTPFunction · 0.92
GetCodeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…