From ade700ff273062f658e5d1bf5ef4242a209b4470 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 9 Jan 2023 14:52:56 -0800 Subject: [PATCH] Fix error message bug to show the correct destination ID thats missing (#685) (#715) Signed-off-by: Ashish Agrawal Signed-off-by: Ashish Agrawal (cherry picked from commit 2a1a18517263fad11ded0b829a248c5cd367da25) Co-authored-by: Ashish Agrawal --- .../src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt index fd89acf8f..7ca0e4800 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt @@ -90,7 +90,7 @@ abstract class MonitorRunner { ): String { val config = getConfigForNotificationAction(action, monitorCtx) if (config.destination == null && config.channel == null) { - throw IllegalStateException("Unable to find a Notification Channel or Destination config with id [${action.id}]") + throw IllegalStateException("Unable to find a Notification Channel or Destination config with id [${action.destinationId}]") } // Adding a check on TEST_ACTION Destination type here to avoid supporting it as a LegacyBaseMessage type