fix: 优化接口超时文案提示
This commit is contained in:
parent
b59ad04c37
commit
7ae187ba63
|
@ -166,7 +166,11 @@ const errorHandler = (error: any) => {
|
|||
showNotification(error?.code, error?.response?.data?.message, '404')
|
||||
}
|
||||
} else if (error.response === undefined) {
|
||||
showNotification(error.message, (error.stack + '').substr(0, 90), undefined)
|
||||
if (error.message.includes('timeout')) {
|
||||
showNotification(error.message, '接口响应超时', undefined)
|
||||
} else {
|
||||
showNotification(error.message, (error.stack + '').substr(0, 90), undefined)
|
||||
}
|
||||
}
|
||||
return Promise.reject(error)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue