mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-25 19:06:13 +03:00
fix(notification-aliyun-sms): throw error when sending SMS failed (#3573)
This commit is contained in:
parent
e745bd69da
commit
c0174dc1c4
1 changed files with 4 additions and 3 deletions
|
@ -18,7 +18,7 @@ class AliyunSMS extends NotificationProvider {
|
||||||
status: this.statusToString(heartbeatJSON["status"]),
|
status: this.statusToString(heartbeatJSON["status"]),
|
||||||
msg: heartbeatJSON["msg"],
|
msg: heartbeatJSON["msg"],
|
||||||
});
|
});
|
||||||
if (this.sendSms(notification, msgBody)) {
|
if (await this.sendSms(notification, msgBody)) {
|
||||||
return okMsg;
|
return okMsg;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -28,7 +28,7 @@ class AliyunSMS extends NotificationProvider {
|
||||||
status: "",
|
status: "",
|
||||||
msg: msg,
|
msg: msg,
|
||||||
});
|
});
|
||||||
if (this.sendSms(notification, msgBody)) {
|
if (await this.sendSms(notification, msgBody)) {
|
||||||
return okMsg;
|
return okMsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,8 @@ class AliyunSMS extends NotificationProvider {
|
||||||
if (result.data.Message === "OK") {
|
if (result.data.Message === "OK") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
throw new Error(result.data.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue