{"record":{"id":"a2d71e4128909fd4","repo":"louislam/uptime-kuma","slug":"flowtriq-notification-failed-with-status-code-re","errorCode":null,"errorMessage":"Flowtriq notification failed with status code ${result.status}","messagePattern":"Flowtriq notification failed with status code (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/notification-providers/flowtriq.js","lineNumber":69,"sourceCode":"                };\n            }\n\n            let headers = {\n                \"Content-Type\": \"application/json\",\n            };\n\n            if (notification.flowtriqApiKey) {\n                headers[\"X-API-Key\"] = notification.flowtriqApiKey;\n            }\n\n            let config = this.getAxiosConfigWithProxy({\n                headers: headers,\n            });\n\n            let result = await axios.post(notification.flowtriqWebhookUrl, data, config);\n\n            if (result.status < 200 || result.status >= 300) {\n                throw new Error(\"Flowtriq notification failed with status code \" + result.status);\n            }\n\n            return okMsg;\n        } catch (error) {\n            this.throwGeneralAxiosError(error);\n        }\n    }\n}\n\nmodule.exports = Flowtriq;\n","sourceCodeStart":51,"sourceCodeEnd":80,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/notification-providers/flowtriq.js#L51-L80","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the Flowtriq notification config and confirm flowtriqWebhookUrl is the exact endpoint given by Flowtriq (no trailing path mistakes).","Verify flowtriqApiKey is set, non-empty, and still valid in the Flowtriq dashboard.","Reproduce with curl -i to the same URL/header/payload to see the real status and body returned by Flowtriq.","If 5xx recurs, check Flowtriq status page / retry later; if 4xx persists, compare your payload shape against Flowtriq's current webhook spec."],"exampleFix":"// before\nlet result = await axios.post(notification.flowtriqWebhookUrl, data, config);\nif (result.status < 200 || result.status >= 300) {\n    throw new Error(\"Flowtriq notification failed with status code \" + result.status);\n}\n\n// after - include response body so the surfaced error is actionable\nlet result = await axios.post(notification.flowtriqWebhookUrl, data, config);\nif (result.status < 200 || result.status >= 300) {\n    throw new Error(`Flowtriq notification failed: HTTP ${result.status} ${JSON.stringify(result.data)}`);\n}","handlingStrategy":"try-catch","validationCode":"if (!notification.flowtriqWebhookUrl || !/^https?:\\/\\//.test(notification.flowtriqWebhookUrl)) {\n    throw new Error(\"flowtriqWebhookUrl must be a valid http(s) URL\");\n}","typeGuard":"/** @param {unknown} n */\nfunction isValidFlowtriqConfig(n) {\n    return typeof n === \"object\" && n !== null &&\n        typeof n.flowtriqWebhookUrl === \"string\" &&\n        /^https?:\\/\\//.test(n.flowtriqWebhookUrl) &&\n        (n.flowtriqApiKey === undefined || typeof n.flowtriqApiKey === \"string\");\n}","tryCatchPattern":"try {\n    const result = await axios.post(notification.flowtriqWebhookUrl, data, config);\n    if (result.status < 200 || result.status >= 300) {\n        throw new Error(`Flowtriq HTTP ${result.status}: ${JSON.stringify(result.data)}`);\n    }\n} catch (e) {\n    // distinguish transport error vs business status error\n    const status = e.response?.status ?? result?.status;\n    if (status >= 500) { /* retryable */ throw e; }\n    if (status === 401 || status === 403) { /* credentials */ throw new Error(\"Flowtriq auth failed\"); }\n    throw e;\n}","preventionTips":["Store and validate flowtriqWebhookUrl at config-save time, not at send time.","Treat 5xx as retryable and 4xx as configuration errors.","Surface response body in the error so root cause is visible without reproducing."],"tags":["network","http","webhook","flowtriq","status-code"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}