MCPcopy Create free account
hub / github.com/cli/cli / shouldRetry

Function shouldRetry

pkg/cmd/release/shared/upload.go:130–136  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

128}
129
130func shouldRetry(err error) bool {
131 if _, ok := errors.AsType[errNetwork](err); ok {
132 return true
133 }
134 var httpError api.HTTPError
135 return errors.As(err, &httpError) && httpError.StatusCode >= 500
136}
137
138// Allow injecting backoff interval in tests.
139var retryInterval = time.Millisecond * 200

Callers 1

uploadWithDeleteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected