From 097df3fcf3ec59254fca677a39e71b87d90040a5 Mon Sep 17 00:00:00 2001 From: Patrick McDonnell Date: Mon, 13 Oct 2025 09:02:39 +0200 Subject: [PATCH 1/2] Include slack channel ID in error message if message could not be delivered Signed-off-by: Patrick McDonnell --- .../src/lib/SlackNotificationProcessor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts index 96d4b2ff3e..f9b00c9a58 100644 --- a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts +++ b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts @@ -148,12 +148,12 @@ export class SlackNotificationProcessor implements NotificationProcessor { let successCount = 0; let failureCount = 0; - results.forEach(result => { + results.forEach((result, index) => { if (result.status === 'fulfilled') { successCount++; } else { this.logger.error( - `Failed to send Slack channel notification: ${result.reason.message}`, + `Failed to send Slack channel notification to ${opts[index].channel}: ${result.reason.message}`, ); failureCount++; } From d959bec54024eb5d075009b233b97c095eb0db76 Mon Sep 17 00:00:00 2001 From: Patrick McDonnell Date: Tue, 14 Oct 2025 09:07:46 +0200 Subject: [PATCH 2/2] Add changeset Signed-off-by: Patrick McDonnell --- .changeset/sad-rockets-rule.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sad-rockets-rule.md diff --git a/.changeset/sad-rockets-rule.md b/.changeset/sad-rockets-rule.md new file mode 100644 index 0000000000..fe15580f99 --- /dev/null +++ b/.changeset/sad-rockets-rule.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-notifications-backend-module-slack': patch +--- + +When an error message is logged due to inability to send a message with the Slack SDK, include the Slack Channel ID in the message to aid debugging.