Skip to content

Commit a43aa34

Browse files
authored
Merge pull request #32 from jaluik/fix-ali-net-error
fix: 修复支付宝中网络异常错误时,response数据丢失的问题
2 parents 6b13694 + 9aca59d commit a43aa34

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/platForm.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ export function transformError (error:any, reject, config) {
8181
case 'alipay':
8282
// https://docs.alipay.com/mini/api/network
8383
if ([14, 19].includes(error.error)) {
84-
reject(createError('Request aborted', config, 'ECONNABORTED', ''))
84+
reject(createError('Request aborted', config, 'ECONNABORTED', '', error))
8585
} else if ([13].includes(error.error)) {
8686
// timeout
87-
reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', ''))
87+
reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', '', error))
8888
} else {
8989
// NetWordError
90-
reject(createError('Network Error', config, null, ''))
90+
reject(createError('Network Error', config, null, '', error))
9191
}
9292
break
9393
case 'baidu':

0 commit comments

Comments
 (0)