louislam/uptime-kuma · error · Error

FlashDuty notification failed with invalid response!

Error message

FlashDuty notification failed with invalid response!

What it means

flashduty.js:100-104. Mirror of the Bark pattern: if the Axios response object lacks a status entirely the response is unusable, so the provider refuses to guess and throws 'invalid response'. Distinct from the out-of-range status branch.

Source

Thrown at server/notification-providers/flashduty.js:104

            headers: { "Content-Type": "application/json" },
            data: {
                description: `[${title}] [${monitorInfo.name}] ${body}`,
                title,
                event_status: eventStatus || "Info",
                alert_key: monitorInfo.id ? String(monitorInfo.id) : Math.random().toString(36).substring(7),
                labels,
            },
        };

        const baseURL = await Settings.get("primaryBaseURL");
        if (baseURL && monitorInfo) {
            options.client = "Uptime Kuma";
            options.client_url = baseURL + getMonitorRelativeURL(monitorInfo.id);
        }

        let result = await axios.request(options);
        if (result.status == null) {
            throw new Error("FlashDuty notification failed with invalid response!");
        }
        if (result.status < 200 || result.status >= 300) {
            throw new Error("FlashDuty notification failed with status code " + result.status);
        }
        if (result.statusText != null) {
            return "FlashDuty notification succeed: " + result.statusText;
        }

        return successMessage;
    }
}

module.exports = FlashDuty;

View on GitHub (pinned to 6b5ea01557)

Solutions

  1. Verify the FlashDuty integration URL is correct and reachable.
  2. Reproduce the request with `curl -i` against the same endpoint to inspect raw response.
  3. Remove or audit Axios response interceptors that could drop the status field.
  4. Confirm the FlashDuty service is operational (status page).
Defensive patterns

Strategy: type-guard

Validate before calling

function isUsableResponse(r) { return r != null && typeof r.status === 'number'; }

Type guard

function hasFlashdutyStatus(r) { return r != null && (typeof r.status === 'number' || r.status == null); }

Try / catch

try { await provider.send(...); }
catch (e) {
    if (/invalid response/i.test(e.message)) log.error('FlashDuty returned no HTTP status — malformed upstream/proxy');
}

Prevention

When it happens

Trigger: FlashDuty returned a non-HTTP/empty stream, a proxy stripped the status, an interceptor mutated the response object, or a network-layer resolution produced an object without status.

Common situations: Self-hosted FlashDuty-compatible gateway returning malformed responses; corporate proxy stripping fields; Axios response interceptors in a custom build.

Related errors


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