louislam/uptime-kuma · error · Error

${resp.data}

Error message

${resp.data}

What it means

cellsynt.js:29-31. Cellsynt returns an error as a plain-text body starting with 'Error:'. The provider strips the 'Error:' prefix and throws the remaining text, which is the human-readable Cellsynt failure reason (e.g. 'Invalid destination', 'Wrong username or password').

Source

Thrown at server/notification-providers/cellsynt.js:31

            // docs at https://www.cellsynt.com/en/sms/api-integration
            params: {
                username: notification.cellsyntLogin,
                password: notification.cellsyntPassword,
                destination: notification.cellsyntDestination,
                text: msg.replace(/[^\x00-\x7F]/g, ""),
                originatortype: notification.cellsyntOriginatortype,
                originator: notification.cellsyntOriginator,
                allowconcat: notification.cellsyntAllowLongSMS ? 6 : 1,
            },
        };
        try {
            let config = this.getAxiosConfigWithProxy(data);
            const resp = await axios.post("https://se-1.cellsynt.net/sms.php", null, config);
            if (resp.data == null) {
                throw new Error("Could not connect to Cellsynt, please try again.");
            } else if (resp.data.includes("Error:")) {
                resp.data = resp.data.replaceAll("Error:", "");
                throw new Error(resp.data);
            }
            return okMsg;
        } catch (error) {
            this.throwGeneralAxiosError(error);
        }
    }
}

module.exports = Cellsynt;

View on GitHub (pinned to 6b5ea01557)

Solutions

  1. Read the stripped message verbatim — it names the Cellsynt reason (auth, destination, credits).
  2. Verify username/password against the Cellsynt customer portal.
  3. Format destination as international number without leading + or 00 per Cellsynt docs.
  4. Check account balance and originator configuration.
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-validate Cellsynt credential + destination format
function cellsyntPreflight(notification) {
    if (!notification.cellsyntLogin || !notification.cellsyntPassword) throw new Error('Cellsynt credentials missing');
    if (!/^\d{6,15}$/.test(notification.cellsyntDestination)) throw new Error('Cellsynt destination must be intl digits');
}

Type guard

function isCellsyntOkBody(s) { return typeof s === 'string' && /^<\?xml/.test(s) && /<status>OK<\/status>/.test(s); }

Try / catch

try { await provider.send(...); }
catch (e) {
    const m = e.message;
    if (/auth|username|password/i.test(m)) log.error('Cellsynt auth — fix credentials');
    else if (/credit|balance/i.test(m)) heartbeat.status = PENDING;
}

Prevention

When it happens

Trigger: Wrong username/password, invalid destination number format, insufficient credits, disallowed originator value, or destination on a blocked operator route.

Common situations: Credentials mismatched; destination not in the E.164 international format Cellsynt expects; originator alphanumeric string exceeds length limits; account out of credits.

Related errors


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