louislam/uptime-kuma · error · Error
${error.response.data ? error.response.data : "Error without
Error message
${error.response.data ? error.response.data : "Error without response"} What it means
Thrown by the GoAlert provider in its catch block. It posts to {goAlertBaseURL}/api/v2/generic/incoming?token={goAlertToken} and, on any thrown exception, checks error.response.data and re-throws it verbatim as the message (or the literal 'Error without response' when there is no response body). Because error.response.data is often an object or Buffer rather than a string, the resulting Error message may serialize oddly; and any non-response failure (DNS, timeout, bad token reaching a network layer) yields the generic fallback.
Source
Thrown at server/notification-providers/goalert.js:36
if (heartbeatJSON != null && heartbeatJSON["status"] === UP) {
data["action"] = "close";
}
let headers = {
"Content-Type": "multipart/form-data",
};
let config = {
headers: headers,
};
config = this.getAxiosConfigWithProxy(config);
await axios.post(
`${notification.goAlertBaseURL}/api/v2/generic/incoming?token=${notification.goAlertToken}`,
data,
config
);
return okMsg;
} catch (error) {
let msg = error.response.data ? error.response.data : "Error without response";
throw new Error(msg);
}
}
}
module.exports = GoAlert;
View on GitHub (pinned to 6b5ea01557)
Solutions
- Confirm goAlertBaseURL is a full URL (e.g. https://goalert.example.com) with no trailing /api/v2 and that GoAlert is reachable from the Uptime Kuma host.
- Verify goAlertToken matches an active incoming token in GoAlert's Generic Integration settings.
- Coerce the message to a string and surface status so the error is readable: String(error.response?.data ?? 'Error without response') plus HTTP status.
- If you see 'Error without response', treat it as a network/DNS/timeout problem, not a GoAlert auth problem.
Example fix
// before
let msg = error.response.data ? error.response.data : "Error without response";
throw new Error(msg);
// after - readable, status-aware message
if (error.response) {
const body = typeof error.response.data === "string" ? error.response.data : JSON.stringify(error.response.data);
throw new Error(`GoAlert API error (HTTP ${error.response.status}): ${body}`);
}
throw new Error(`GoAlert request failed without response: ${error.code || error.message}`); Defensive patterns
Strategy: try-catch
Validate before calling
const base = String(notification.goAlertBaseURL || "").replace(/\/+$/, "");
if (!/^https?:\/\//.test(base)) {
throw new Error("goAlertBaseURL must be a full http(s) URL");
}
if (!notification.goAlertToken) {
throw new Error("goAlertToken is required");
} Type guard
/** @param {unknown} n */
function isValidGoAlertConfig(n) {
return typeof n === "object" && n !== null &&
typeof n.goAlertBaseURL === "string" && /^https?:\/\//.test(n.goAlertBaseURL) &&
typeof n.goAlertToken === "string" && n.goAlertToken.length > 0;
} Try / catch
try {
await axios.post(url, data, config);
} catch (error) {
if (error.response) {
const body = typeof error.response.data === "string"
? error.response.data
: JSON.stringify(error.response.data);
throw new Error(`GoAlert HTTP ${error.response.status}: ${body}`);
}
throw new Error(`GoAlert transport error: ${error.code || error.message}`);
} Prevention
- Differentiate response errors (auth/payload) from no-response errors (network/DNS).
- Always stringify object bodies before embedding in an Error message.
- Keep goAlertToken in a secret store and rotate without leaving stale values.
When it happens
Trigger: GoAlert returns a non-2xx (axios rejects) with a body in error.response.data — e.g. 400 for a malformed token, 401/403 for an invalid goAlertToken, 404 for a wrong goAlertBaseURL. Also fires for connection-level failures (ECONNREFUSED, ENOTFOUND, ETIMEDOUT) where error.response is undefined, producing 'Error without response'.
Common situations: goAlertToken mistyped or revoked in GoAlert; goAlertBaseURL missing the scheme or pointing at an address without the /api/v2 route; GoAlert server behind a proxy that strips the query token; GoAlert not running / wrong port.
Related errors
- OneChat API Error: ${errorMessage}
- Flowtriq notification failed with status code ${result.statu
- Nextcloud Talk Error ${result?.status ?? "Unknown"}
- Unexpected status code: ${result.status}
- Status code ${result.statusCode} not accepted. Output: ${res
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/2d9608ac6ed3d8e5.
Report an issue: GitHub.