mirror of https://github.com/apache/cloudstack.git
requests: handle error in case of network errors
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
922fd06451
commit
f69369f2ea
|
|
@ -93,7 +93,7 @@ export default {
|
|||
},
|
||||
{
|
||||
api: 'getDiagnosticsData',
|
||||
icon: 'experiment',
|
||||
icon: 'download',
|
||||
label: 'label.action.get.diagnostics',
|
||||
dataView: true,
|
||||
show: (record) => { return record.state === 'Running' },
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ export default {
|
|||
},
|
||||
{
|
||||
api: 'getDiagnosticsData',
|
||||
icon: 'experiment',
|
||||
icon: 'download',
|
||||
label: 'label.action.get.diagnostics',
|
||||
dataView: true,
|
||||
show: (record) => { return record.state === 'Running' },
|
||||
|
|
|
|||
|
|
@ -55,6 +55,12 @@ const err = (error) => {
|
|||
this.$router.push({ path: '/exception/404' })
|
||||
}
|
||||
}
|
||||
if (error.isAxiosError && !error.response) {
|
||||
notification.warn({
|
||||
message: error.message || 'Network Error',
|
||||
description: 'Unable to reach the management server or a browser extension may be blocking the network request.'
|
||||
})
|
||||
}
|
||||
return Promise.reject(error)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue