()
| 200 | } |
| 201 | |
| 202 | func (r *backendResponse) succeeded() bool { |
| 203 | if r.err != nil { |
| 204 | return false |
| 205 | } |
| 206 | |
| 207 | // We consider the response successful if it's a 2xx or 4xx (but not 429). |
| 208 | return (r.status >= 200 && r.status < 300) || (r.status >= 400 && r.status < 500 && r.status != 429) |
| 209 | } |
| 210 | |
| 211 | func (r *backendResponse) statusCode() int { |
| 212 | if r.err != nil || r.status <= 0 { |
no outgoing calls