(kind)
| 167 | } |
| 168 | |
| 169 | function pickDelay(kind) { |
| 170 | if (kind === 'transient') { |
| 171 | const idx = Math.min( |
| 172 | Math.max(0, _state.transientFailures - 1), |
| 173 | BACKOFF_STEPS_TRANSIENT_MS.length - 1, |
| 174 | ); |
| 175 | return BACKOFF_STEPS_TRANSIENT_MS[idx]; |
| 176 | } |
| 177 | if (kind === 'funds') { |
| 178 | const idx = Math.min( |
| 179 | Math.max(0, _state.fundsFailures - 1), |
| 180 | BACKOFF_STEPS_FUNDS_MS.length - 1, |
| 181 | ); |
| 182 | return BACKOFF_STEPS_FUNDS_MS[idx]; |
| 183 | } |
| 184 | return 5 * 60 * 1000; |
| 185 | } |
| 186 | |
| 187 | function classifyFailure(status, errorText) { |
| 188 | const text = String(errorText || '').toLowerCase(); |
no outgoing calls
no test coverage detected