u
This commit is contained in:
parent
f2ea4ac0a7
commit
d0e05199b1
8
index.js
8
index.js
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user