{"record":{"id":"8369a2fe2bdde542","repo":"louislam/uptime-kuma","slug":"response-data-errormsg-smsplanet-server-did","errorCode":null,"errorMessage":"${response.data?.errorMsg ?? \"SMSPlanet server did not respond with the expected result\"}","messagePattern":"\\$\\{response\\.data\\?\\.errorMsg \\?\\? \"SMSPlanet server did not respond with the expected result\"\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/notification-providers/sms-planet.js","lineNumber":31,"sourceCode":"\n        try {\n            let config = {\n                headers: {\n                    Authorization: \"Bearer \" + notification.smsplanetApiToken,\n                    \"content-type\": \"multipart/form-data\",\n                },\n            };\n            config = this.getAxiosConfigWithProxy(config);\n\n            let data = {\n                from: notification.smsplanetSenderName,\n                to: notification.smsplanetPhoneNumbers,\n                msg: msg.replace(/🔴/, \"❌\"),\n            };\n\n            let response = await axios.post(url, data, config);\n            if (!response.data?.messageId) {\n                throw new Error(response.data?.errorMsg ?? \"SMSPlanet server did not respond with the expected result\");\n            }\n\n            return okMsg;\n        } catch (error) {\n            this.throwGeneralAxiosError(error);\n        }\n    }\n}\n\nmodule.exports = SMSPlanet;\n","sourceCodeStart":13,"sourceCodeEnd":42,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/notification-providers/sms-planet.js#L13-L42","documentation":"SMSPlanet POSTs the SMS and checks response.data.messageId; if absent it throws response.data.errorMsg or the literal 'SMSPlanet server did not respond with the expected result'. Like the Ooredoo case, this is a logical-success check: the transport may have returned 2xx, but without a messageId the message was not accepted. The thrown Error is caught and re-processed through throwGeneralAxiosError.","triggerScenarios":"SMSPlanet returns 2xx with an error envelope (no messageId) due to invalid sender name, unverified recipient numbers, insufficient account credit, malformed phone numbers, or wrong credentials accepted at transport but rejected at logic.","commonSituations":"smsplanetSenderName not registered/approved in SMSPlanet; smsplanetPhoneNumbers in a format SMSPlanet rejects; account out of credits; credentials valid for auth but account restricted.","solutions":["Read errorMsg in the surfaced text (or the fallback) to get SMSPlanet's stated reason and act on it.","Confirm smsplanetSenderName is an approved sender name in your SMSPlanet account.","Verify smsplanetPhoneNumbers are valid and in the expected format.","Check SMSPlanet account credit/balance and re-test."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!notification.smsplanetSenderName || !notification.smsplanetPhoneNumbers) {\n    throw new Error(\"smsplanetSenderName and smsplanetPhoneNumbers are required\");\n}","typeGuard":"/** @param {unknown} data */\nfunction isSmsPlanetAccepted(data) {\n    return !!data && typeof data === \"object\" && typeof data.messageId !== \"undefined\";\n}","tryCatchPattern":"const response = await axios.post(url, data, config);\nif (!isSmsPlanetAccepted(response.data)) {\n    throw new Error(response.data?.errorMsg || \"SMSPlanet did not return a messageId\");\n}","preventionTips":["Treat presence of messageId as the only success signal, not HTTP 2xx.","Surface errorMsg so the gateway reason is visible.","Keep sender name approved and monitor account credit."],"tags":["network","http","sms-planet","sms","gateway-rejection"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}