add more detailed msg for axios

This commit is contained in:
ericchanky 2021-11-25 18:34:23 +08:00 committed by GitHub
parent 9f0c66d775
commit 8c2a2a4834
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -361,7 +361,11 @@ class Monitor extends BeanModel {
} catch (error) {
bean.msg = error.message;
if (axios.isAxiosError(error)) {
bean.msg = JSON.stringify(error.response.data)
} else {
bean.msg = error.message;
}
// If UP come in here, it must be upside down mode
// Just reset the retries