Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
fix: Subchannel Posting Should Not Error Entire Process (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
therynamo authored Mar 13, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 2776d75 commit 97562c1
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/handlers/postMessageHandler.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ module.exports = async function postMessage({ blocks, channel = null, text, chan
try {
await fetch(channelUrl, postOptions(blocks, text, channel));
} catch (e) {
throw e;
console.error(`Channel not found at URL: ${channelUrl}`, e);
}

return response;
@@ -31,7 +31,7 @@ module.exports = async function postMessage({ blocks, channel = null, text, chan
try {
response = await slack.chat.postMessage({ blocks, channel, text });
} catch (e) {
throw e;
console.error(`Channel "${channel}" not found.`, e);
}

return response;
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -78,7 +78,6 @@ module.exports = async function App(config) {
await sendDelayedMessages(blocks => releaseCommunication.sendMessage(blocks), preparedBlocks);
} catch (error) {
console.error('Failed to send message to release channel:', error);
throw error;
}

// Send all individual attachments to their respective channels per team.

0 comments on commit 97562c1

Please sign in to comment.