(ms)
| 25 | const isRetryableNetworkError = (error) => { |
| 26 | if (!error) return false |
| 27 | // 已收到 HTTP 响应 = 上游回包了, 不是传输问题 |
| 28 | if (error.response) return false |
| 29 | if (error.code && RETRYABLE_ERROR_CODES.has(error.code)) return true |
| 30 | if (typeof error.message === 'string' && error.message.includes('socket hang up')) return true |