louislam/uptime-kuma · error · Error

Flowtriq notification failed with status code ${result.statu

Error message

Flowtriq notification failed with status code ${result.status}

What it means

Thrown by the Flowtriq provider after POSTing to the configured webhook when the HTTP response status falls outside the 2xx range (status < 200 || status >= 300). The provider builds a JSON payload with source/status/monitor/msg plus optional heartbeat and monitorInfo, optionally attaches an X-API-Key header, then treats any non-success status as a hard failure. The thrown Error is immediately caught by the surrounding try/catch and re-processed through throwGeneralAxiosError, so the surfaced message is this string plus any appended response detail.

Source

Thrown at server/notification-providers/flowtriq.js:69

                };
            }

            let headers = {
                "Content-Type": "application/json",
            };

            if (notification.flowtriqApiKey) {
                headers["X-API-Key"] = notification.flowtriqApiKey;
            }

            let config = this.getAxiosConfigWithProxy({
                headers: headers,
            });

            let result = await axios.post(notification.flowtriqWebhookUrl, data, config);

            if (result.status < 200 || result.status >= 300) {
                throw new Error("Flowtriq notification failed with status code " + result.status);
            }

            return okMsg;
        } catch (error) {
            this.throwGeneralAxiosError(error);
        }
    }
}

module.exports = Flowtriq;

View on GitHub (pinned to 6b5ea01557)

Solutions

  1. Open the Flowtriq notification config and confirm flowtriqWebhookUrl is the exact endpoint given by Flowtriq (no trailing path mistakes).
  2. Verify flowtriqApiKey is set, non-empty, and still valid in the Flowtriq dashboard.
  3. Reproduce with curl -i to the same URL/header/payload to see the real status and body returned by Flowtriq.
  4. If 5xx recurs, check Flowtriq status page / retry later; if 4xx persists, compare your payload shape against Flowtriq's current webhook spec.

Example fix

// before
let result = await axios.post(notification.flowtriqWebhookUrl, data, config);
if (result.status < 200 || result.status >= 300) {
    throw new Error("Flowtriq notification failed with status code " + result.status);
}

// after - include response body so the surfaced error is actionable
let result = await axios.post(notification.flowtriqWebhookUrl, data, config);
if (result.status < 200 || result.status >= 300) {
    throw new Error(`Flowtriq notification failed: HTTP ${result.status} ${JSON.stringify(result.data)}`);
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (!notification.flowtriqWebhookUrl || !/^https?:\/\//.test(notification.flowtriqWebhookUrl)) {
    throw new Error("flowtriqWebhookUrl must be a valid http(s) URL");
}

Type guard

/** @param {unknown} n */
function isValidFlowtriqConfig(n) {
    return typeof n === "object" && n !== null &&
        typeof n.flowtriqWebhookUrl === "string" &&
        /^https?:\/\//.test(n.flowtriqWebhookUrl) &&
        (n.flowtriqApiKey === undefined || typeof n.flowtriqApiKey === "string");
}

Try / catch

try {
    const result = await axios.post(notification.flowtriqWebhookUrl, data, config);
    if (result.status < 200 || result.status >= 300) {
        throw new Error(`Flowtriq HTTP ${result.status}: ${JSON.stringify(result.data)}`);
    }
} catch (e) {
    // distinguish transport error vs business status error
    const status = e.response?.status ?? result?.status;
    if (status >= 500) { /* retryable */ throw e; }
    if (status === 401 || status === 403) { /* credentials */ throw new Error("Flowtriq auth failed"); }
    throw e;
}

Prevention

When it happens

Trigger: axios.post(notification.flowtriqWebhookUrl, ...) resolves with result.status of 401/403 (bad or missing flowtriqApiKey), 404 (wrong/typo webhook URL), 400 (payload rejected by Flowtriq), or any 5xx from the Flowtriq service. Note: with axios defaults, non-2xx responses reject as exceptions rather than resolving, so this branch only fires if validateStatus was widened; otherwise the catch path handles it.

Common situations: Webhook URL copy/pasted incorrectly or pointing at the wrong Flowtriq endpoint, an expired/revoked API key, a Flowtriq account whose plan rejects inbound webhooks, or a Flowtriq-side outage returning 5xx.

Related errors


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