mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-13 08:02: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) {
|
||||
|
||||
if (axios.isAxiosError(error)) {
|
||||
bean.msg = JSON.stringify(error.response.data);
|
||||
if (axios.isAxiosError(error) && error.response) {
|
||||
bean.msg = `${error.message}, ${JSON.stringify(error.response.data)}`;
|
||||
} else {
|
||||
bean.msg = error.message;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue