{"record":{"id":"81bf1c536365944b","repo":"louislam/uptime-kuma","slug":"vkteams-api-returned-error-response-data-descri","errorCode":null,"errorMessage":"VKTeams API returned error: ${response.data.description}","messagePattern":"VKTeams API returned error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/notification-providers/vkteams.js","lineNumber":38,"sourceCode":"\n            if (notification.vkteamsUseTemplate && notification.vkteamsTemplate) {\n                rawParams.text = await this.renderTemplate(\n                    notification.vkteamsTemplate,\n                    msg,\n                    monitorJSON,\n                    heartbeatJSON\n                );\n\n                if (notification.vkteamsTemplateFormat && notification.vkteamsTemplateFormat !== \"plain\") {\n                    rawParams.parseMode = notification.vkteamsTemplateFormat;\n                }\n            }\n\n            const params = new URLSearchParams(rawParams).toString();\n            const config = this.getAxiosConfigWithProxy({});\n            const response = await axios.get(`${baseUrl}/bot/v1/messages/sendText?${params}`, config);\n            if (response.data?.ok === false) {\n                throw new Error(`VKTeams API returned error: ${response.data.description}`);\n            }\n\n            return okMsg;\n        } catch (error) {\n            this.throwGeneralAxiosError(error);\n        }\n    }\n}\n\nmodule.exports = VKTeams;\n","sourceCodeStart":20,"sourceCodeEnd":49,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/notification-providers/vkteams.js#L20-L49","documentation":"Thrown by the VKTeams (MyTeam) provider when response.data.ok === false. The VKTeams Bot API wraps outcomes in {ok:boolean, description:string}; ok:false with a description indicates the request was processed but rejected (auth, chat, content).","triggerScenarios":"Invalid/expired bot token, chatId that does not exist or the bot was not added to, text exceeds the length limit, parseMode set to an unsupported value, or vkteamsBaseUrl pointing at the wrong host.","commonSituations":"Bot removed from the chat, token regenerated in MyTeam admin but not updated, vkteamsBaseUrl overridden to a deprecated domain, or HTML parseMode used on plain text with unescaped markup.","solutions":["Re-create the bot token in VKTeams Bot platform and update notification.vkteamsBotToken.","Confirm vkteamsChatId is correct and the bot is a member of that chat (send any message from the bot manually to verify).","If using vkteamsTemplateFormat, ensure the value ('HTML' or 'Markdown') matches the body content; set to 'plain' to disable parsing.","Reset vkteamsBaseUrl to the default (https://myteam.mail.ru) if it was customized."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-flight required VKTeams fields\nif (!notification.vkteamsBotToken) throw new Error(\"VKTeams bot token is required\");\nif (!notification.vkteamsChatId) throw new Error(\"VKTeams chatId is required\");\nif (notification.vkteamsBaseUrl) {\n    try { new URL(notification.vkteamsBaseUrl); } catch { throw new Error(\"vkteamsBaseUrl is not a valid URL\"); }\n}","typeGuard":"/** True when the VKTeams body signals failure with a description. */\nfunction isVkTeamsFailure(data) {\n    return data && typeof data === \"object\" && data.ok === false && typeof data.description === \"string\";\n}","tryCatchPattern":"try {\n    const response = await axios.get(url, config);\n    if (response.data?.ok === false) {\n        throw new Error(`VKTeams API returned error: ${response.data.description ?? \"no description\"}`);\n    }\n} catch (err) {\n    this.throwGeneralAxiosError(err);\n}","preventionTips":["Re-add the bot to the chat whenever membership changes.","Regenerate tokens promptly and update configs.","Match parseMode to the body format you actually send."],"tags":["vkteams","notification-provider","api-error","config","auth"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}