Merge pull request #31396 from kc9ddi/include-slack-channel-name-in-error-message
Include slack channel ID in error message if message could not be sent
This commit is contained in:
@@ -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.
|
||||
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user