Skip to content

Commit 2df5de6

Browse files
committed
address review feedback
guard against unexpected types
1 parent 18a1e8f commit 2df5de6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/slack/actions/find-message/find-message.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default {
165165
? error
166166
: error?.data?.error || error?.message;
167167

168-
if (!errorCode.includes("missing_scope")) {
168+
if (!errorCode?.includes("missing_scope")) {
169169
return false;
170170
}
171171

components/slack/slack.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export default {
561561
if ([
562562
"not_in_channel",
563563
"channel_not_found",
564-
].some((errorType) => error.includes(errorType)) && asBot) {
564+
].some((errorType) => `${error}`.includes(errorType)) && asBot) {
565565
const followUp = method.startsWith("chat.")
566566
? "Ensure the bot is a member of the channel, or set the **Send as User** option to true to act on behalf of the authenticated user."
567567
: "Ensure the bot is a member of the channel.";

0 commit comments

Comments
 (0)