tomsun28 commented on code in PR #3779:
URL: https://github.com/apache/hertzbeat/pull/3779#discussion_r2363341979
##########
hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/notice/impl/WebHookAlertNotifyHandlerImpl.java:
##########
@@ -39,18 +39,35 @@ final class WebHookAlertNotifyHandlerImpl extends
AbstractAlertNotifyHandlerImpl
@Override
public void send(NoticeReceiver receiver, NoticeTemplate noticeTemplate,
GroupAlert alert) {
try {
+ String hookUrl = receiver.getHookUrl();
+
+ // Validate URL completeness and add debug logging
+ if (hookUrl == null || hookUrl.trim().isEmpty()) {
+ throw new AlertNoticeException("Webhook URL is null or empty");
+ }
+
+ // Check if URL is truncated (missing required query parameters)
+ if (hookUrl.contains("logic.azure.cn") &&
!hookUrl.contains("sig=")) {
Review Comment:
hi, why use the `logic.azure.cn` here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]