{"record":{"id":"ea850bb3cff33e79","repo":"louislam/uptime-kuma","slug":"nextcloud-talk-error-result-status-unknown","errorCode":null,"errorMessage":"Nextcloud Talk Error ${result?.status ?? \"Unknown\"}","messagePattern":"Nextcloud Talk Error (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/notification-providers/nextcloudtalk.js","lineNumber":53,"sourceCode":"        };\n\n        const options = {\n            ...config,\n            headers: {\n                \"X-Nextcloud-Talk-Bot-Random\": talkRandom,\n                \"X-Nextcloud-Talk-Bot-Signature\": talkSignature,\n                \"OCS-APIRequest\": true,\n            },\n        };\n\n        try {\n            let result = await axios.post(url, data, options);\n\n            if (result?.status === 201) {\n                return okMsg;\n            }\n\n            throw new Error(\"Nextcloud Talk Error \" + (result?.status ?? \"Unknown\"));\n        } catch (error) {\n            this.throwGeneralAxiosError(error);\n        }\n    }\n}\n\nmodule.exports = NextcloudTalk;\n","sourceCodeStart":35,"sourceCodeEnd":61,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/notification-providers/nextcloudtalk.js#L35-L61","documentation":"The Nextcloud Talk provider POSTs a signed message to the Talk bot URL and strictly requires result.status === 201 (Created). Any other status — including 200 OK — is treated as failure and this Error is thrown, then immediately caught and re-processed through throwGeneralAxiosError. The request includes a custom X-Nextcloud-Talk-Bot-Signature header and OCS-APIRequest header, so auth/signing problems surface here.","triggerScenarios":"Nextcloud Talk returns 200 instead of 201 (older/different Talk version), 401 when the bot token/secret is wrong so the signature mismatches, 403 if the bot is not enabled in the chat, 404 for a wrong URL room token, or 400 for a malformed request body.","commonSituations":"Bot secret (used to compute talkSignature) incorrect or rotated; URL points to a room that no longer exists; Nextcloud Talk version returns non-201 success codes; reverse proxy rewriting the path.","solutions":["Re-copy the Bot URL and the Bot secret exactly from Nextcloud Talk -> Conversation -> Add bot / Settings.","Confirm the signature is computed over the raw request body with the correct algorithm the Talk bot expects.","If the server legitimately returns 200 on success, widen the success check to accept 200 and 201.","Check Nextcloud logs (data/nextcloud.log) for the rejected request to see the real reason."],"exampleFix":"// before\nif (result?.status === 201) {\n    return okMsg;\n}\nthrow new Error(\"Nextcloud Talk Error \" + (result?.status ?? \"Unknown\"));\n\n// after - accept the documented success codes\nif (result?.status === 200 || result?.status === 201) {\n    return okMsg;\n}\nthrow new Error(`Nextcloud Talk Error ${result?.status ?? \"Unknown\"}: ${JSON.stringify(result?.data)}`);","handlingStrategy":"try-catch","validationCode":"if (!notification.nextcloudtalkURL || !notification.nextcloudtalkSecret) {\n    throw new Error(\"Nextcloud Talk bot URL and secret are required\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    const result = await axios.post(url, data, options);\n    if (result?.status === 200 || result?.status === 201) return okMsg;\n    throw new Error(`Nextcloud Talk rejected: HTTP ${result?.status}`);\n} catch (error) {\n    if (error.response && error.response.status === 401) {\n        throw new Error(\"Nextcloud Talk signature/auth rejected - check bot secret\");\n    }\n    throw error;\n}","preventionTips":["If your Talk version returns 200 on success, accept both 200 and 201.","Keep the bot secret synchronized with the Talk bot config.","Log Nextcloud's response body on failure for faster diagnosis."],"tags":["network","http","nextcloud-talk","status-code","bot"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}