(ctx context.Context, resp *http.Response, err error)
| 107 | } |
| 108 | |
| 109 | func 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 | |
| 128 | func getNoAuthConfiguration() (common.ConfigurationProvider, error) { |
| 129 | return &noAuthConfigurator{}, nil |
no test coverage detected
searching dependent graphs…