louislam/uptime-kuma · error · Error

${response.data?.errorMsg ?? "SMSPlanet server did not respo

Error message

${response.data?.errorMsg ?? "SMSPlanet server did not respond with the expected result"}

What it means

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.

Source

Thrown at server/notification-providers/sms-planet.js:31

        try {
            let config = {
                headers: {
                    Authorization: "Bearer " + notification.smsplanetApiToken,
                    "content-type": "multipart/form-data",
                },
            };
            config = this.getAxiosConfigWithProxy(config);

            let data = {
                from: notification.smsplanetSenderName,
                to: notification.smsplanetPhoneNumbers,
                msg: msg.replace(/🔴/, "❌"),
            };

            let response = await axios.post(url, data, config);
            if (!response.data?.messageId) {
                throw new Error(response.data?.errorMsg ?? "SMSPlanet server did not respond with the expected result");
            }

            return okMsg;
        } catch (error) {
            this.throwGeneralAxiosError(error);
        }
    }
}

module.exports = SMSPlanet;

View on GitHub (pinned to 6b5ea01557)

Solutions

  1. Read errorMsg in the surfaced text (or the fallback) to get SMSPlanet's stated reason and act on it.
  2. Confirm smsplanetSenderName is an approved sender name in your SMSPlanet account.
  3. Verify smsplanetPhoneNumbers are valid and in the expected format.
  4. Check SMSPlanet account credit/balance and re-test.
Defensive patterns

Strategy: try-catch

Validate before calling

if (!notification.smsplanetSenderName || !notification.smsplanetPhoneNumbers) {
    throw new Error("smsplanetSenderName and smsplanetPhoneNumbers are required");
}

Type guard

/** @param {unknown} data */
function isSmsPlanetAccepted(data) {
    return !!data && typeof data === "object" && typeof data.messageId !== "undefined";
}

Try / catch

const response = await axios.post(url, data, config);
if (!isSmsPlanetAccepted(response.data)) {
    throw new Error(response.data?.errorMsg || "SMSPlanet did not return a messageId");
}

Prevention

When it happens

Trigger: 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.

Common situations: smsplanetSenderName not registered/approved in SMSPlanet; smsplanetPhoneNumbers in a format SMSPlanet rejects; account out of credits; credentials valid for auth but account restricted.

Related errors


AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12). Data as JSON: /api/errors/8369a2fe2bdde542. Report an issue: GitHub.