MCPcopy Index your code
hub / github.com/cloudfoundry/cli / skipRetry

Method skipRetry

api/cloudcontroller/wrapper/retry_request.go:58–65  ·  view source on GitHub ↗

skipRetry will skip retry if the request method is POST or contains a status code that is not one of following http status codes: 500, 502, 503, 504.

(httpMethod string, response *http.Response)

Source from the content-addressed store, hash-verified

56// skipRetry will skip retry if the request method is POST or contains a status
57// code that is not one of following http status codes: 500, 502, 503, 504.
58func (*RetryRequest) skipRetry(httpMethod string, response *http.Response) bool {
59 return httpMethod == http.MethodPost ||
60 response != nil &&
61 response.StatusCode != http.StatusInternalServerError &&
62 response.StatusCode != http.StatusBadGateway &&
63 response.StatusCode != http.StatusServiceUnavailable &&
64 response.StatusCode != http.StatusGatewayTimeout
65}

Callers 1

MakeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected