Make sure that errors in the incoming webhook url are caught.

This commit is contained in:
James Cole
2024-02-14 19:32:15 +01:00
parent a2c0d9f7d0
commit 1b1712d998
2 changed files with 14 additions and 6 deletions

View File

@@ -112,11 +112,11 @@ class RuleActionFailed extends Notification
$slackUrl = '';
}
if (UrlValidator::isValidWebhookURL((string)$slackUrl)) {
app('log')->debug('Will send ruleActionFailed through Slack!');
app('log')->debug('Will send ruleActionFailed through Slack or Discord!');
return ['slack'];
}
app('log')->debug('Will NOT send ruleActionFailed through Slack');
app('log')->debug('Will NOT send ruleActionFailed through Slack or Discord');
return [];
}