{"record":{"id":"0ea51f381869ef45","repo":"louislam/uptime-kuma","slug":"flashduty-notification-failed-with-invalid-respons","errorCode":null,"errorMessage":"FlashDuty notification failed with invalid response!","messagePattern":"FlashDuty notification failed with invalid response!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/notification-providers/flashduty.js","lineNumber":104,"sourceCode":"            headers: { \"Content-Type\": \"application/json\" },\n            data: {\n                description: `[${title}] [${monitorInfo.name}] ${body}`,\n                title,\n                event_status: eventStatus || \"Info\",\n                alert_key: monitorInfo.id ? String(monitorInfo.id) : Math.random().toString(36).substring(7),\n                labels,\n            },\n        };\n\n        const baseURL = await Settings.get(\"primaryBaseURL\");\n        if (baseURL && monitorInfo) {\n            options.client = \"Uptime Kuma\";\n            options.client_url = baseURL + getMonitorRelativeURL(monitorInfo.id);\n        }\n\n        let result = await axios.request(options);\n        if (result.status == null) {\n            throw new Error(\"FlashDuty notification failed with invalid response!\");\n        }\n        if (result.status < 200 || result.status >= 300) {\n            throw new Error(\"FlashDuty notification failed with status code \" + result.status);\n        }\n        if (result.statusText != null) {\n            return \"FlashDuty notification succeed: \" + result.statusText;\n        }\n\n        return successMessage;\n    }\n}\n\nmodule.exports = FlashDuty;\n","sourceCodeStart":86,"sourceCodeEnd":118,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/notification-providers/flashduty.js#L86-L118","documentation":"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.","triggerScenarios":"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.","commonSituations":"Self-hosted FlashDuty-compatible gateway returning malformed responses; corporate proxy stripping fields; Axios response interceptors in a custom build.","solutions":["Verify the FlashDuty integration URL is correct and reachable.","Reproduce the request with `curl -i` against the same endpoint to inspect raw response.","Remove or audit Axios response interceptors that could drop the status field.","Confirm the FlashDuty service is operational (status page)."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"function isUsableResponse(r) { return r != null && typeof r.status === 'number'; }","typeGuard":"function hasFlashdutyStatus(r) { return r != null && (typeof r.status === 'number' || r.status == null); }","tryCatchPattern":"try { await provider.send(...); }\ncatch (e) {\n    if (/invalid response/i.test(e.message)) log.error('FlashDuty returned no HTTP status — malformed upstream/proxy');\n}","preventionTips":["Audit Axios response interceptors in custom builds; they must preserve status.","Self-hosted FlashDuty gateways must emit valid HTTP status lines."],"tags":["notification","flashduty","http","response"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}