louislam/uptime-kuma · warning · Error
Unknown Octopush version!
Error message
Unknown Octopush version!
What it means
The Octopush provider branches on notification.octopushVersion to build either the V2 or V1 request; the else branch throws 'Unknown Octopush version!' when the version is neither of the supported values. This is a pure configuration guard before any HTTP call for the unsupported branch.
Source
Thrown at server/notification-providers/octopush.js:68
let config = {
headers: {
"cache-control": "no-cache",
},
params: data,
};
config = this.getAxiosConfigWithProxy(config);
// V1 API returns 200 even on error so we must check
// response data
let response = await axios.post(urlV1, {}, config);
if ("error_code" in response.data) {
if (response.data.error_code !== "000") {
this.throwGeneralAxiosError(`Octopush error ${JSON.stringify(response.data)}`);
}
}
} else {
throw new Error("Unknown Octopush version!");
}
return okMsg;
} catch (error) {
this.throwGeneralAxiosError(error);
}
}
}
module.exports = Octopush;
View on GitHub (pinned to 6b5ea01557)
Solutions
- Set notification.octopushVersion to exactly one of the two supported values exposed in the Octopush notification form.
- If the form/options were customized, verify the version selector still emits the expected constants.
- Save the notification and re-run the test send.
Defensive patterns
Strategy: validation
Validate before calling
const supported = [/* the two version constants from the form */];
if (!supported.includes(notification.octopushVersion)) {
throw new Error(`octopushVersion must be one of: ${supported.join(", ")}`);
} Type guard
/** @param {unknown} v */
function isSupportedOctopushVersion(v, supported) {
return typeof v === "string" && supported.includes(v);
} Prevention
- Constrain the version field to a fixed set in the UI (dropdown, not free text).
- Validate at save time so the user learns before a real alert fires.
- After a config migration, re-check stored version values.
When it happens
Trigger: notification.octopushVersion is unset, an empty string, or a value other than the two supported constants (e.g. a typo like 'v1'/'v2' lowercase vs the expected casing, or '3').
Common situations: The version dropdown/field was left at its default placeholder; a config migration changed the stored value; user typed a free-form value instead of choosing from the supported set.
Related errors
- Interval cannot be less than ${MIN_INTERVAL_SECOND} seconds
- Retry interval cannot be less than ${MIN_INTERVAL_SECOND} se
- Response max length cannot be less than 0
- Response max length cannot be more than ${RESPONSE_BODY_LENG
- Kafka Producer Brokers must be valid JSON: ${e.message}
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/d33461ec74f14e46.
Report an issue: GitHub.