{"record":{"id":"db09aa5d4d47c064","repo":"louislam/uptime-kuma","slug":"result-data-message","errorCode":null,"errorMessage":"${result.data.Message}","messagePattern":"\\$\\{result\\.data\\.Message\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/notification-providers/aliyun-sms.js","lineNumber":86,"sourceCode":"\n        params.Signature = this.sign(params, notification.secretAccessKey);\n        let config = {\n            method: \"POST\",\n            url: \"http://dysmsapi.aliyuncs.com/\",\n            headers: {\n                \"Content-Type\": \"application/x-www-form-urlencoded\",\n            },\n            data: qs.stringify(params),\n        };\n\n        config = this.getAxiosConfigWithProxy(config);\n\n        let result = await axios(config);\n        if (result.data.Message === \"OK\") {\n            return true;\n        }\n\n        throw new Error(result.data.Message);\n    }\n\n    /**\n     * Aliyun request sign\n     * @param {object} param Parameters object to sign\n     * @param {string} AccessKeySecret Secret key to sign parameters with\n     * @returns {string} Base64 encoded request\n     */\n    sign(param, AccessKeySecret) {\n        let param2 = {};\n        let data = [];\n\n        let oa = Object.keys(param).sort();\n\n        for (let i = 0; i < oa.length; i++) {\n            let key = oa[i];\n            param2[key] = param[key];\n        }","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/notification-providers/aliyun-sms.js#L68-L104","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Sanity-check credentials + phone format before calling Aliyun\nfunction isE164(n) { return /^\\+?[1-9]\\d{6,14}$/.test(n); }\nfunction preflightAliyun(notification, phone) {\n    if (!notification.accessKeyId || !notification.secretAccessKey) throw new Error('Aliyun credentials missing');\n    if (!isE164(phone)) throw new Error('Bad destination format for Aliyun SMS');\n}","typeGuard":"function isAliyunOkPayload(data) { return data && typeof data.Message === 'string' && typeof data.Code === 'string'; }","tryCatchPattern":"try { await provider.send(...); }\ncatch (e) {\n    const m = e.message;\n    if (/SignatureDoesNotMatch|InvalidAccessKeyId/.test(m)) log.error('Aliyun auth — fix key/secret');\n    else if (/BUSINESS_LIMIT_CONTROL|AMOUNT_NOT_ENOUGH/.test(m)) heartbeat.status = PENDING;\n    else heartbeat.status = DOWN;\n}","preventionTips":["Pre-register and approve Sign Name + Template Code in Aliyun before wiring up.","Keep credential rotation documented; test after each rotation."],"tags":["notification","sms","aliyun","api","credentials"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}