louislam/uptime-kuma

Using webhook notification provider with multiline messages results in broken payloads

Open

#3,778 创建于 2023年9月20日

在 GitHub 查看
 (9 评论) (0 反应) (0 负责人)JavaScript (86,760 star) (7,844 fork)batch import
A:notificationsbuggood first issuetype:enhance-existing

描述

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

I recently updated to 1.23.1.

I am using a webhook notification to send alerts when monitored services are down using PING

I can do a test send and I receive it. I also receive notifications when a service comes back up after being down, but the alert letting me know a service went down in the first place isn't coming through. The logs are included below

📝 Error Message(s) or Log

2023-09-20T20:51:51.094326466Z 2023-09-20T14:51:51-06:00 [MONITOR] ERROR: Cannot send notification to Uptime-Kuma Dectection
2023-09-20T20:51:51.096885926Z Error: Error: AxiosError: Request failed with status code 400 {"status":400,"error":{"message":"Unexpected token \""}}
2023-09-20T20:51:51.096922873Z     at Webhook.throwGeneralAxiosError (/app/server/notification-providers/notification-provider.js:38:15)
2023-09-20T20:51:51.096953290Z     at Webhook.send (/app/server/notification-providers/webhook.js:57:18)
2023-09-20T20:51:51.096960747Z     at runMicrotasks (<anonymous>)
2023-09-20T20:51:51.096967522Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-09-20T20:51:51.096973864Z     at async Function.sendNotification (/app/server/model/monitor.js:1380:21)
2023-09-20T20:51:51.096980236Z     at async beat (/app/server/model/monitor.js:917:21)
2023-09-20T20:51:51.096988676Z     at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:985:17)

🐻 Uptime-Kuma Version

1.23.1

💻 Operating System and Arch

Ubuntu Server 20.04

🌐 Browser

Chrome

🐋 Docker Version

No response

🟩 NodeJS Version

No response

贡献者指南

Using webhook notification provider with multiline messages results in broken payloads · louislam/uptime-kuma#3778 | Good First Issue