louislam/uptime-kuma · error · Error
${result.data.Message}
Error message
${result.data.Message} What it means
aliyun-sms.js:84-86. The Aliyun SMS API returns JSON with a top-level `Message` field that is literally 'OK' on success and an error code (e.g. 'isv.BUSINESS_LIMIT_CONTROL', 'SignatureDoesNotMatch') otherwise. This branch throws that raw provider error string.
Source
Thrown at server/notification-providers/aliyun-sms.js:86
params.Signature = this.sign(params, notification.secretAccessKey);
let config = {
method: "POST",
url: "http://dysmsapi.aliyuncs.com/",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
data: qs.stringify(params),
};
config = this.getAxiosConfigWithProxy(config);
let result = await axios(config);
if (result.data.Message === "OK") {
return true;
}
throw new Error(result.data.Message);
}
/**
* Aliyun request sign
* @param {object} param Parameters object to sign
* @param {string} AccessKeySecret Secret key to sign parameters with
* @returns {string} Base64 encoded request
*/
sign(param, AccessKeySecret) {
let param2 = {};
let data = [];
let oa = Object.keys(param).sort();
for (let i = 0; i < oa.length; i++) {
let key = oa[i];
param2[key] = param[key];
}View on GitHub (pinned to 6b5ea01557)
Solutions
- Read the thrown Aliyun error code prefix: `isv.*` → business/rate-limit, `Signature.*`/`InvalidAccessKeyId` → credentials.
- Verify the SMS Sign Name and Template Code are approved and active in the Aliyun console.
- Ensure phone numbers are in the format Aliyun expects (e.g. +86… or local per region rules).
- Regenerate the AccessKey pair in Aliyun RAM and update the Uptime Kuma notification provider.
- Check account balance/quota if the code indicates AMOUNT_NOT_ENOUGH.
Defensive patterns
Strategy: validation
Validate before calling
// Sanity-check credentials + phone format before calling Aliyun
function isE164(n) { return /^\+?[1-9]\d{6,14}$/.test(n); }
function preflightAliyun(notification, phone) {
if (!notification.accessKeyId || !notification.secretAccessKey) throw new Error('Aliyun credentials missing');
if (!isE164(phone)) throw new Error('Bad destination format for Aliyun SMS');
} Type guard
function isAliyunOkPayload(data) { return data && typeof data.Message === 'string' && typeof data.Code === 'string'; } Try / catch
try { await provider.send(...); }
catch (e) {
const m = e.message;
if (/SignatureDoesNotMatch|InvalidAccessKeyId/.test(m)) log.error('Aliyun auth — fix key/secret');
else if (/BUSINESS_LIMIT_CONTROL|AMOUNT_NOT_ENOUGH/.test(m)) heartbeat.status = PENDING;
else heartbeat.status = DOWN;
} Prevention
- Pre-register and approve Sign Name + Template Code in Aliyun before wiring up.
- Keep credential rotation documented; test after each rotation.
When it happens
Trigger: Wrong AccessKeyId/Secret (SignatureDoesNotMatch), unapproved SMS template or signature (isv.SMS_TEMPLATE_ILLEGAL), throttling (isv.BUSINESS_LIMIT_CONTROL), invalid phone number format (isv.MOBILE_NUMBER_ILLEGAL), or insufficient account balance (isv.AMOUNT_NOT_ENOUGH).
Common situations: Newly created template not yet approved; sending frequency hit Aliyun's per-number/per-day limits; phone numbers not in E.164/international format the API expects; AccessKey rotated server-side but not in Uptime Kuma.
Related errors
- ${data?.error_string || JSON.stringify(data)}
- ${resp.data}
- Could not connect to Cellsynt, please try again.
- docker host not found
- Failed to create measurement: ${this.formatTooManyRequestsEr
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/db09aa5d4d47c064.
Report an issue: GitHub.