This commit is contained in:
陆柯 2021-10-03 08:45:34 +08:00
parent f2ea4ac0a7
commit d0e05199b1

View File

@ -147,10 +147,10 @@ module.exports = {
.catch((error) => { // {errMsg, stack} = error
if (/request:fail/.test(error.errMsg)) {
// 后台云服务无法连接
return { result: { _state: 'CLIENT_BACKEND_BROKEN' } }
result = { _state: 'CLIENT_BACKEND_BROKEN', error }
} else {
// 后台云服务返回异常
return { result: { _state: 'CLIENT_BACKEND_EXCEPTION', error } }
result = { _state: 'CLIENT_BACKEND_EXCEPTION', error }
}
})
result = resultCloud
@ -170,10 +170,10 @@ module.exports = {
if (error) {
if (error.errMsg === 'request:fail') {
// 后台服务器无法连接
result = { _state: 'CLIENT_BACKEND_BROKEN' }
result = { _state: 'CLIENT_BACKEND_BROKEN', error }
} else if (error.errMsg === 'request:fail timeout') {
// 后台服务器超时
result = { _state: 'CLIENT_BACKEND_TIMEOUT' }
result = { _state: 'CLIENT_BACKEND_TIMEOUT', error }
} else {
// 后台服务器返回异常
result = { _state: 'CLIENT_BACKEND_EXCEPTION', error }