mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-14 16:42:35 +02:00
update message format
prevent response is undefined
This commit is contained in:
parent
a38f7f0c82
commit
80f4a98492
1 changed files with 2 additions and 2 deletions
|
@ -361,8 +361,8 @@ class Monitor extends BeanModel {
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
if (axios.isAxiosError(error)) {
|
if (axios.isAxiosError(error) && error.response) {
|
||||||
bean.msg = JSON.stringify(error.response.data);
|
bean.msg = `${error.message}, ${JSON.stringify(error.response.data)}`;
|
||||||
} else {
|
} else {
|
||||||
bean.msg = error.message;
|
bean.msg = error.message;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue