()
| 179 | } |
| 180 | |
| 181 | func (c *TraceByIDCombiner) shouldQuit() bool { |
| 182 | if c.code/100 == 5 { // Bail on 5xx |
| 183 | return true |
| 184 | } |
| 185 | |
| 186 | // test special case for 404 |
| 187 | if c.code == http.StatusNotFound { |
| 188 | return false |
| 189 | } |
| 190 | |
| 191 | // test special case for 422 |
| 192 | if c.code == http.StatusUnprocessableEntity { |
| 193 | return true |
| 194 | } |
| 195 | |
| 196 | // bail on other 400s |
| 197 | if c.code/100 == 4 { |
| 198 | return true |
| 199 | } |
| 200 | |
| 201 | // 2xx and 404 are OK |
| 202 | return false |
| 203 | } |
no outgoing calls
no test coverage detected