MCPcopy Create free account
hub / github.com/Rfym21/Qwen2API / isRetryableNetworkError

Function isRetryableNetworkError

src/utils/request.js:18–25  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

16 'ETIMEDOUT',
17 'ECONNABORTED',
18 'EAI_AGAIN'
19])
20
21const isRetryableNetworkError = (error) => {
22 if (!error) return false
23 // 已收到 HTTP 响应 = 上游回包了, 不是传输问题
24 if (error.response) return false
25 if (error.code && RETRYABLE_ERROR_CODES.has(error.code)) return true
26 if (typeof error.message === 'string' && error.message.includes('socket hang up')) return true
27 return false
28}

Callers 1

sendChatRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected