in pipeline/endpoints/servicecontrol.go [187:205]
func (ep *ServiceControlEndpoint) IsTransient(err error) bool {
if err == nil {
return false
}
switch v := err.(type) {
case *googleapi.Error:
// Return true if this is an http error with a 5xx code.
return v.Code >= 500 && v.Code < 600
case net.Error:
// Return true if this error is considered temporary or a timeout.
return v.Temporary() || v.Timeout()
case *checkError:
return v.transient
default:
// Some non-http error (perhaps a connection refused or timeout?)
// We'll retry.
return true
}
}