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

  1. Set notification.octopushVersion to exactly one of the two supported values exposed in the Octopush notification form.
  2. If the form/options were customized, verify the version selector still emits the expected constants.
  3. 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

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


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